"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

Member
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