CAOS-Programmierung: Befehlsgruppen: Input
<< Befehlsgruppen | Inhaltsverzeichnis >>
Input
CLAC (command) message (integer)
Set the click action, which is the identifier of the message sent to the agent when it is clicked on, provided attribute Activateable is set. Default is activate 1. Use -1 to prevent it sending a message. Also overriden by CLIK. Remember that the early Message Numbers differ slightly from Script Numbers.
CLIK (command) message_1 (integer) message_2 (integer) message_3 (integer)
Sets a chain of three message ids to cycle through as the agent is clicked on. Entries of -1 are ignored. Overriden by CLAC.
HOTP (integer)
Returns the number of the compound part under the pointer. Returns -1 if no agent is under the pointer, and 0 if the agent is simple or a skeletal creature. Transparency of the parts is ignored, so each part is a rectangle. Transparency of the agent as a whole is, however, obeyed. Planes are also ignored, except later part numbers are treated as above earlier ones. See also HOTS to find the agent under the pointer.
HOTS (agent)
Returns the agent nearest the screen under the hotspot of the pointer. For each agent, TRAN decides whether this allows for transparent pixels. See also HOTP, which does the same for compound parts.
IMSK (command) mask (integer)
Set the input event mask. Indicates which types of global input events the agent is interested in, if any. For example, if the flag for "key up" events is set here, the agents "key up" script will be run every time a key is released. Input event bit flags are 1 Raw Key Down 2 Raw Key Up 4 Raw Mouse Move 8 Raw Mouse Down 16 Raw Mouse Up 32 Raw Mouse Wheel 64 Raw Translated Char You can find the script numbers executed by following the links above. KEYD (integer) keycode (integer) Returns 1 if the specified key is currently pressed down, 0 if not.
MOPX (integer)
Returns x position of mouse in world coordinates.
MOPY (integer)
Returns y position of mouse in world coordinates.
MOUS (command) behaviour (integer)
Defines the behaviour of the mouse button for the default pointer behaviour - see PURE. 0 is normal 1 means the right button does what the left button does 2 means the left button does what the right button does
MOVX (float)
Returns horizontal mouse velocity.
MOVY (float)
Returns vertical mouse velocity.
PURE (command) value (integer)
Enables or disables the default clicking and moving behaviour of the pointer. This default behaviour is to implement CLAC and CLIK, and to operate ports. Set to 1 to enable, 0 to disable. When disabled, use IMSK to hook mouse events.
PURE (integer)
Returns whether default pointer behaviour is disabled or enabled. 1 if enabled, 0 if disabled.
TRAN (command) transparency (integer) part_no (integer)
Sets pixel transparency awareness. 1 for pixel perfect, so transparent parts of the agent can't be clicked. 0 to allow anywhere on the agent rectangle to be clicked. See also the option parameter on PAT: BUTT which overrides this.
<< Befehlsgruppen | Inhaltsverzeichnis >>