(info) This AI is still in early stages of development.

instance.activate()

Activate the interval timer for a process instance, causing the instance to be run at regular intervals until deactivated.

 

Syntax

Process("myProcess").activate(quiet);

Parameters

ParameterTypeMandatoryNotesPulse Version

quiet

Boolean

(error)

If true the instance.onActivate() event will not be fired.

Default: false

0.1

Return value

ValueTypeNotesProcess 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:

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.activeA boolean indicating whether the process instance has an active timer interval.
  • instance.stateIndicates whether the process is currently idle, running or aborting.
  • instance.intervalThe current interval time set for a process instance.
  • instance.run()Run a process instance to execute it's tasks.
  • instance.skipsA number used to determine if a process instance is stalling due to other processes being run.
  • instance.runsA 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.autoActivateA boolean value stating whether the process instance should automatically activate or not.
  • instance.processNameA string containing the name of the instance process
  • instance.autoDeactivateA 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.dataThe processData object for a process instance.