scriptDone: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <dd class="notedate">" to " <dt><dt> <dd class="notedate">") |
Lou Montana (talk | contribs) m (Text replacement - "<!-- Note Section [A-Z]+ --> " to "") |
||
Line 24: | Line 24: | ||
<dl class="command_description"> | <dl class="command_description"> | ||
<dt><dt> | <dt><dt> | ||
<dd class="notedate">Posted on 03:54, 11 September 2009</dd> | <dd class="notedate">Posted on 03:54, 11 September 2009</dd> | ||
Line 33: | Line 32: | ||
<code> [[scriptDone]] _handle </code> and it returns "<NULL-script>" when converted to string. This in turn lets you initialize the variable with a completed [[Script_(Handle)]] and lets you test the variable even though nothing else may have set the handle by creating a script with [[spawn]] or [[execVM]]. It also lets you store and manage script handles in arrays, and a few other sexy things.</dd> | <code> [[scriptDone]] _handle </code> and it returns "<NULL-script>" when converted to string. This in turn lets you initialize the variable with a completed [[Script_(Handle)]] and lets you test the variable even though nothing else may have set the handle by creating a script with [[spawn]] or [[execVM]]. It also lets you store and manage script handles in arrays, and a few other sexy things.</dd> | ||
</dl> | </dl> | ||
Revision as of 00:43, 6 April 2021
Description
- Description:
- Description needed
- Groups:
- Program Flow
Syntax
- Syntax:
- Syntax needed
- Parameters:
- handle: Script (Handle) - handle returned by spawn or execVM
- Return Value:
- Return value needed
Examples
- Example 1:
- SQS Syntax:
@scriptDone _Handle
- Example 2:
- SQF Syntax:
script_handler = [parameters] execVM "scriptname.sqf"; waitUntil { scriptDone script_handler };
Additional Information
- See also:
- execVMspawnterminatescriptNull
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
- Posted on 03:54, 11 September 2009
- Bn880
- A Null Script handle can be created in this manner:
_handle = 0 spawn {};
That is what any Script_(Handle) becomes when a script is finished running, meaning it will test as true with:scriptDone _handle
and it returns "<NULL-script>" when converted to string. This in turn lets you initialize the variable with a completed Script_(Handle) and lets you test the variable even though nothing else may have set the handle by creating a script with spawn or execVM. It also lets you store and manage script handles in arrays, and a few other sexy things.