How to touch an actor so that it leads to the movement of another actor?
shaihem2014
Member Posts: 26
Hi guys,
Although I though it would be an easy task but I tried my best so that when I press or touch an actor another actor will move.
How is that can be done?
Thanks in advance
Although I though it would be an easy task but I tried my best so that when I press or touch an actor another actor will move.
How is that can be done?
Thanks in advance
Best Answer
-
shark1505 Posts: 75Create a boolean game attribute called touchActor.
We'll call the actor you touch "Touch" and the moving actor "Move".
In the Touch actor, create a rule that says
When touch is pressed
-Change Attribute game.touchActor to true
When touch is released
-Change attribute game.touchActor to false
In the Move actor create a rule:
When game.touchActor is true
-Move (here you can input where you want the actor to move, what direction you want the Move actor to move in, or you can do random(0,359) to make the actor move randomly)
Answers