Difference between revisions of "Release.priority"
(24 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | release.priority | + | The '''release.priority''' command restores automatic priority assignment based on a screen object's position. |
− | + | == Syntax == | |
− | + | release.priority([[screen object|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 == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | <div class="CodeBlockHeader">Code:</div> | |
− | + | <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 == | |
− | |||
+ | {| border="1" cellpadding="2" | ||
+ | | style="background-color: #efefef" width="200" | '''Required Interpreter Version:''' | ||
+ | | width="175" | Available in all AGI versions. | ||
+ | |- | ||
+ | | style="background-color: #efefef" | '''Byte-Code Value:''' | ||
+ | | 55 (0x37 hex) | ||
+ | |} | ||
+ | == See Also == | ||
− | [[ | + | '''[[set.priority]]'''<br /> |
+ | '''[[set.priority.v]]'''<br /> | ||
+ | [[Category:Commands]]<br /> |
Latest revision as of 15:45, 19 April 2019
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
<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) |