Robot
Robots (ID 124, Robot
) are built-ins which are capable of executing Robotic scripts. They are the most powerful type of built-in, and the main power behind all but the simplest MegaZeux games.
Robots are often used to represent objects and actors within the game, to govern effects and changes to the game world, and to implement engines.
Behavior
Robots execute a number of commands in their Robotic script every cycle determined by the current value of the COMMANDS counter. When a command halts the program—either temporarily through a cycle-ending command such as WAIT, or indefinitely through END—or when the commands limit is reached, the Robot automatically yields execution to the next object on the board. This makes Robots analogous to cooperative coroutines in other programming languages.
Pushable Robots
Pushable Robot # 123 ![]() | |
Robotic name | PushableRobot
|
Default color | none |
Default param | storage object ID |
ID char | 0 (#123) |
Attributes | Active Pushable: all |
Effect when touched |
Receive (#)TOUCHED
|
Special when pushed |
Receive (#)PUSHED (if pushed by Player)
|
Special when shot |
Receive shot label(s) |
Special when bombed |
Receive (#)BOMBED
|
Pushable Robots (ID 123, PushableRobot
) are an alternate ID of Robots. The only difference between Robots and Pushable Robots is that Pushable Robots can be pushed by the Player and other things, whereas regular Robots can not be pushed.
Other alternate Robot states, such as locking, lavawalking, and goopwalking, are handled through internal state variables instead.
ZZT connection
In ZZT, the equivalent element to Robot is zzt:Object, which uses a completely different non-compatible scripting languages.