Success/Failed switch

Crank1dCrank1d Member Posts: 8
edited November -1 in Working with GS (Mac)
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

  • DrGlickertDrGlickert Member Posts: 1,135
    Not really sure what you want to do. Sounds like a general question to me. Try to be more specific as to what you're trying to accomplish.

    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!
Sign In or Register to comment.