Endgame: Difference between revisions

From Wiki of ZZT
Jump to navigation Jump to search
(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...")
 
(No difference)

Latest revision as of 07:25, 8 February 2021

#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.