Player: Difference between revisions

From Wiki of ZZT
Jump to navigation Jump to search
No edit summary
(My bad, just realized 'destructible' in the infobox is referring to a field in elementDefs in the source)
Line 8: Line 8:
|stats=yes
|stats=yes
|cycle=1
|cycle=1
|destructible=
|destructible=yes
|effect on movement=
|effect on movement=
|uses zzt-oop color=no
|uses zzt-oop color=no
Line 17: Line 17:
= Capabilities =
= Capabilities =


The player is the only in-game ZZT element that responds directly to user input, and also the only element that can collect items, unlock [[door|doors]], and issue [[touch]] events to [[object|objects]]. It can change the current active [[board]] by touching [[passage|passages]] and [[edge|board edges]].
Besides the [[monitor|title screen monitor]], the player is the only in-game ZZT element that responds directly to user input. It's also also the only element that can collect items, unlock [[door|doors]], and issue [[touch]] events to [[object|objects]]. It can change the current active [[board]] by touching [[passage|passages]] and [[edge|board edges]].




Line 24: Line 24:
During a game session, ZZT assumes that only one player exists and that it occupies slot 0 in the [[stat list]]. Additional player entities (colloquially referred to as ''player clones'') can be placed in the editor or created at run-time with [[ZZT-OOP]].
During a game session, ZZT assumes that only one player exists and that it occupies slot 0 in the [[stat list]]. Additional player entities (colloquially referred to as ''player clones'') can be placed in the editor or created at run-time with [[ZZT-OOP]].


The player is intended to be indestructible, even on [[game over]], but can be erased from a board as a result of the [[conveyor|conveyor stat glitch]]. The player's tick function handles input, so if the player is destroyed in this manner, ZZT itself will become unresponsive.
The player is meant to effectively be indestructible, even on [[game over]], but can be erased from a board as a result of the [[conveyor|conveyor stat glitch]]. The player's tick function handles input, so if the player is destroyed in this manner, ZZT itself will become unresponsive.
 
On [[title screen|title screens]], a [[monitor]] exists in place of the player to handle keyboard input.





Revision as of 16:09, 19 April 2021

Player
ZZT-OOP nameplayer
Internal ID4 (0x04)
Character#char 2 (0x02)
Default colorwhite on blue (0x9F)
Categoryitem
Stats
Default cycle1
Other traits
Effect on movement
Destructible?yes
Uses ZZT-OOP color names?no

The Player is the user's in-game avatar.

Capabilities

Besides the title screen monitor, the player is the only in-game ZZT element that responds directly to user input. It's also also the only element that can collect items, unlock doors, and issue touch events to objects. It can change the current active board by touching passages and board edges.


Appearances

During a game session, ZZT assumes that only one player exists and that it occupies slot 0 in the stat list. Additional player entities (colloquially referred to as player clones) can be placed in the editor or created at run-time with ZZT-OOP.

The player is meant to effectively be indestructible, even on game over, but can be erased from a board as a result of the conveyor stat glitch. The player's tick function handles input, so if the player is destroyed in this manner, ZZT itself will become unresponsive.