Hello,
I want to change the animation of an object if its direction change, but the problem is when the object changes its direction all other objects change there animation, even if there are in the wrong direction.
How to fix it?
CAPX: https://www.dropbox.com/s/j7ep6xdck96uwxo/How%20Do%20I%20Change%20Animation%20When%20Direction%20Is%20Changed.capx?dl=0
The reason all the objects change is because event 4 is top level instead of being a sub event of event 3; this means that all S_1 objects are being selected rather than just the one with the same variable as the S_0 that collided.
You also needed to swap over the animations when the direction changes.
Here's an updated capx:
https://www.dropbox.com/s/e2ajrvpne0mo4 ... .capx?dl=0
If S_0 and S_1 are always created together I would recommend putting them in a container - that way you won't need to use the variable check to identify the S_1:
https://www.scirra.com/manual/150/containers
Develop games in your browser. Powerful, performant & highly capable.
Thank you very much, you fix my problem. And thank you for the "Containers" idea it's very useful.
Meqara:
No problem