Program.control

From AGI Wiki
Jump to: navigation, search

The program.control command changes the ego screen object control mode to program control instead of player control.

Syntax

program.control();

Remarks

When operating in program control mode, player input will not control ego. Instead, ego motion can be controlled just like any other screen object. Using the move.obj, move.obj.v or wander command on ego will also switch ego to program control mode automatically.

If ego is in motion when the program.control command is executed, ego will continue moving in its current direction.

The player.control command will restore normal player control over ego.

Possible Errors

None.

Example

Code:
program.control();  [ now player cannot control ego
...
player.control();   [ player control is restored

Technical Information

Required Interpreter Version: Available in all AGI versions.
Byte-Code Value: 131 (0x83 hex)

See Also

System Commands
player.control