I have created a scene for a door, which has a hook for a signal when a user is trying to open the door. When this is called, it checks to see if the door the player is trying to open is the current one, and if so, it calls
print_debug calls confirm it is making the call to
play on the correct instance, but the animation actually occurs on the other instance.
The code that handles the
entering_door signal can be found below:
print_debug("player entering door " + door.name)
if self.name.nocasecmp_to(door.name) == 0:
print_debug("starting animation for " + self.name)
Is this normal behaviour? If so, how would one approach having an instanced scene that contains animations?
My idea behind this was to create a scene which will let me hook up a few signals and then have multiple doors in the parent scene that are all consistent and can be managed with one set of code etc.