This AI is still in early stages of development.
instance()
- Aubergine
Â
Syntax
// Preferred method (for code clarity): // retrieve "foo" then run it Processes("foo")(runData, ignoreQueueSize); Â // Exactly the same as doing this: Processes("foo").run(runData, ignoreQueueSize); Â // Alternate method (for code brevity): // run a "foo" via it's global function foo(runData, ignoreQueueSize); Â // Exactly the same as: foo.run(runData, ignoreQueueSize); Â // ...all four methods do exactly the same thing, they are just different syntaxes.
Parameters
Parameter | Type | Mandatory | Notes | Pulse Version |
---|---|---|---|---|
runData | Variant | Optionally pass in a value or an object that will be exposed to Tasks, and some events, as the "runData" parameter. See Notes section below for additional information. Defaults to an empty object. | 0.1 | |
ignoreQueueSize | Boolean | If set to Defaults to | 0.1 |
Return value
Value | Type | Notes | Process Version |
---|---|---|---|
<instance> | Process Instance | The process instance is returned, so you can chain more instance methods, eg: Processes("foo")(...).addTask(...); | 0.1 |
Notes
Each time a new instance run is started, the runData parameter is pushed in to a stack so that each run can be given its applicable runData. When the current run finishes, its runData is removed from the stack and the next run starts.
If a trigger has more than Process.MAX_QUEUE runs in its queue, warning messages will be shown to indicate that developer attention is likely required (basically the process instance is becoming overloaded). If you expect to be issuing multiple runs on an instance in short succession, for example because a game event is triggering it, set the ignoreQueueSize parameter to true
to avoid such warnings.
Availability
Requires:
- Warzone 3.1 or above
- Process 0.1 or above
Â