Get.dir

From AGI Wiki
Revision as of 20:08, 1 April 2019 by Andrew Korson (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The get.dir command stores a screen object's direction in a variable.

Syntax

get.dir(obj oA, var vDIR);

Remarks

Variable vDIR is assigned the direction of screen object oA. The value will be between 0 and 8:

MovingObjects.png

Possible Errors

AGI does not check that object number oA is a valid screen object. If it is not, the returned value will be meaningless.

Example

Code:

<syntaxhighlight lang="agi"> get.dir(o12, v50); [ v50 now equals the direction of o12 </syntaxhighlight>

Technical Information

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

See Also

set.dir