Success/Failed switch
Crank1d
Member Posts: 8
What is is the best way to make switch, for example i have some "good characters" and "bad characters" on the scene and when all bad actors are destroyed it would show text "Successful" but if one of good characters are destroyed, it would show "Failed"? Is it better to use boolean or integer attribute for that kind of stuff?
Comments
If you want to display a "You Failed" after a player fails, then I'd put an actor off to the side and when the player fails; a boolean game.attribute is changed from false -> true (game.failed is what I usually use). In the "You Failed" actor, have a rule that when game.failed = true then change attribute self.position to center of the screen. Have another rule that allows the player to touch it and restart the level.
But I would suggest using booleans for things like that.
Good luck!