Player

From Wiki of ZZT
Jump to navigation Jump to search
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 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 index 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.

Player Clones

The king in yellow...
This page is a stub!
Somebody recolor the walls!

Player clones with stats have many useful side effects. Due to the game expecting the player to always be the first element in the stat list, the canonical player will move to the location where the last player clone was supposed to move, allowing objects to force the player to arbitrary locations on the board.

Statless Player Clones

The king in yellow...
This page is a stub!
Somebody recolor the walls!

Statless player clones do not run the player tick function, so they do not attract the player to them. However, they can be any arbitrary color, in addition to being visible in the dark.