Release.priority

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

The release.priority command restores automatic priority assignment based on a screen object's position.

Syntax

release.priority(obj oA);

Remarks

The default behavior for screen objects is to automatically assign priority based on position. The set.priority command assigns a static priority value and disables the automatic priority assignment.

The release.priority command restores normal behavior to screen object oA. AGI will change the priority of screen object oA to match its current position at the end of the current interpreter cycle.

If the screen object already assigns priority based on position, release.loop has no effect.

Possible Errors

AGI does not check that object number oA is a valid screen object. If it is not, this command will overwrite other data on the memory heap, which may cause unexpected results, including possibly crashing AGI.

Example

Code:

<syntaxhighlight lang="agi"> set.priority(o1, 15); [ priority won't change if object position changes ... release.priority(o1); [ restore automatic priority assignment </syntaxhighlight>

Technical Information

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

See Also

set.priority
set.priority.v