Help moving a row of actors from side to side.
chrstahl89
Member Posts: 35
Hey,
I have all of my logic set up so that when my main actor hits the left wall it moves down, moves to the right until it hits that wall etc... Now I am trying to get it so I can have an entire row say of 6 actors, but I want them to all move down when one does. Any ideas?
I have all of my logic set up so that when my main actor hits the left wall it moves down, moves to the right until it hits that wall etc... Now I am trying to get it so I can have an entire row say of 6 actors, but I want them to all move down when one does. Any ideas?
Comments
To "communicate" between actors, as in your example, when one actor hits a wall, have every actor move down, you need to use global game attributes.
In that case you'll need a boolean attribute called something like "enemyHasHitWall".
When one of the Actors hits a wall, set this global game attribute to True.
Then have all of the Actors listen for this attribute in Rule, like this:
When game.enemyHasHitWall = True
[Move Down]
[Change game.enemyHasHitWall back to False]