This AI is still in early stages of development.
instance.activate()
- Aubergine
Syntax
Process("myProcess").activate(quiet);
Parameters
Parameter | Type | Mandatory | Notes | Pulse Version |
---|---|---|---|---|
quiet | Boolean | If Default: | 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: Process("foo").activate(...).addTask(...).run(); | 0.1 |
Notes
When you activate a process instance, a timer will be set that will run the instance on a set interval until the instance is deactivated.
The time interval is defined when creating instances using Process(), and can be later updated using instance.changeInteval().
If you want an instance to automatically become active when eventStartLevel() is fired, set autoActivate to true
when creating it via Process().
Note: By default, all instances are deactivated when the player associated with the script (me) is killed. If you don't want this behaviour for a specific instance set the autoDeactivate to false
when creating the instance via Process().
Availability
Requires:
- Warzone 3.1 or above
- Process 0.1 or above
Contents
Jump to:
See also
Related documentation:
- instance.deactivate() – deactivate an instance
- instance.active – property stating whether an instance timer is currently active
- Processes.deactivateAll() – deactivate all instances
- setTimer() – the JS API function that the process instance uses to set timer intervals.
Process Instances
Related articles:
- instance.activate() — Activate the interval timer for a process instance, causing the instance to be run at regular intervals until deactivated.
- instance.onRun() — Fired immediately before a new process run starts.
- instance.onEnd() — Fired immediately before the current process run ends.
- instance.onActivate() — Fired when the interval timer for a process instance becomes active.
- instance() — Process instances are functions which you can run to, uhm..., run them...
- instance.onDeactivate() — Fired when the interval timer for a process instance has been deactivated.
- instance.active — A boolean indicating whether the process instance has an active timer interval.
- instance.state — Indicates whether the process is currently idle, running or aborting.
- instance.interval — The current interval time set for a process instance.
- instance.run() — Run a process instance to execute it's tasks.
- instance.skips — A number used to determine if a process instance is stalling due to other processes being run.
- instance.runs — A number indicating how many times a process instance has been run
- instance.changeInterval() — Change the timer interval for a process instance.
- instance.deactivate() — Deactivate the interval timer so the process instance will no longer be run at a regular interval.
- instance.autoActivate — A boolean value stating whether the process instance should automatically activate or not.
- instance.processName — A string containing the name of the instance process
- instance.autoDeactivate — A boolean value stating whether the process instance should automatically deactivate or not.
- instance.addTask() — Adds a new task to a process instance.
- instance.abort() — Abort the current run of a process instance, optionally cancelling any queued runs.
- instance.removeTask() — Remove any matching tasks, or all tasks, from a process instance.
- instance.data — The processData object for a process instance.