Welcome to the Creatures Wiki! Log in and join the community.

KEYD

From Creatures Wiki
Jump to navigation Jump to search

KEYD is a CAOS command that returns whether a keyboard key is being pressed.

Syntax[edit]

KEYD keycode(integer)

Returns 1 if the key indicated by the keycode is being pressed.

Examples[edit]

The Hoverdoc has a script that listens for a keyboard shortcut:

scrp 1 1 223 73
	inst
	doif keyd 17 = 1
		doif _p1_ = 'H'
			(help the player find the hoverdoc)

See C1 Carp Lanterns (teardown) for the use of KEYD in a DOIF condition to control what happens with shift-clicking vs normal-clicking.

External links[edit]