Endgame

From Wiki of ZZT
Revision as of 07:25, 8 February 2021 by RT-55J (talk | contribs) (Created page with "'''#endgame''' is a ZZT-OOP command that sets the player's health to 0, thus ending the game. '''#endgame''' can also be used to efficiently set the player's h...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

#endgame is a ZZT-OOP command that sets the player's health to 0, thus ending the game.

#endgame can also be used to efficiently set the player's health to an arbitrary value without causing a game over by using #give health on the same tick, as in this code example:

@HealthSetter
#endgame
#give health 100

If an /idle were inserted between the #endgame and the #give, then a game over would happen and then the player would be brought back to life with the game in the hyperspeed state.