• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

"other" keyword in timelines?

Suzaku

Member
Im trying to use the other keyword inside of a timeline which is used by a object. The timeline is called in a colision event between 2 objects, but the other keyword doesnt seem to point at the other object involved in the colision event, I dont know why. I even tried the with statement inside of the timeline, but the other keyword wont work at all. It works perfectly if I just put the name of the other object instead of other keyword. Why that happens in my timeline?
 

FrostyCat

Redemption Seeker
other is only valid in 2 situations:
  • Inside a true collision event (i.e. the one from the event selector, NOT a fake one simulated by collision functions in the Step event)
  • Inside a with block
If you want to use it in a timeline, save other.id into an instance variable during the collision event:
Code:
inst_other = other.id;
Then consistently use inst_other throughout the timeline.
 
Top