How to destroy an actor like this.
TailGames
Member Posts: 76
i have a button and a electrical current that i want to turn off with the button,when the button is pressed the electricity stops, how can this be acheived?
if you have anyway of making a video demonstrating that would be amazing!!!!
if you have anyway of making a video demonstrating that would be amazing!!!!
Comments
Then in your button you have a simple rule like this:
Rule: when touch is pressed change attribute game.ElecOn to false
Then in any rule that depends on the electricity being on you just wrap it in a rule that says when electricity it false.
Example:
In the electricity actor:
When game.ElecOn is true
change self.color.alpha to 1
animate .....
OTHERWISE
change self.color.alpha to 0
In your hero that doesn't want to get electricuted:
When game.ElecOn is true AND
when actor overlaps with actor of type elctricity
change self.Dead to true (you would have to create this self attribute of course)
When self.dead is true
animate (death sequence)
Timer: after 2 seconds
reset scene
1) Open up some of the demo projects found in the GScreator start window
2) Go to youtube and look at the GameSalad CookBook channel.
3) Go to GShelper.com and watch TshirtBooth's videos
After you have done that my explanation above will be very easy to understand.
Best of luck!