Hi,
I have several backroundAnims which i would like to change the animation order when triggered. Basically I have a rope animation with 4 images, the order 0,1,2,3 will produce a forward rope motion and 3,2,1,0 a backward motion how can i reference specific background animations from another entity.
1 decade ago
by Arantor
Declare both as individual animations, they're stored as part of an entity so you will be able to find the first entity from the second and trigger the animation that way.
However, I'm not clear where the whole 'two entities' thing comes in and why it needs to be triggered from the other entity...
I use entites in te same way already, I'll try and explain a little better;
I have some gear entities which rotate untill a trigger flips the animation, the triggers are fired by a moving plaform . When the platform changes directing so do the gears (its just for looks). Now instead of creating loads of entities for the ropes (which can be any number of tiles in length) i create them as a background animation which it also makes very fast to place in the world editor. The ropes need to change direction when the gears do. I have an entity ready which is triggered but I cant see to reference the map background animations.
Worked it out in the end:
ig.game.backgroundAnims["media/ropesh.png"]["0"].flip.x = true;
Page 1 of 1
« first
« previous
next ›
last »