Waypoints: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (removed empty headline)
(Page refresh)
Line 1: Line 1:
'''Description:'''
[[Waypoints]] are a group's successive destination/task indicator (see [[setWaypointType]] for a list of available types). They are represented as an [[Array]] in [[Waypoint]] format [group, index].


'''Condition''' expression must return a [[Boolean]] value, and is used to determine when the waypoint execution is terminated.  
Since '''[[ArmA 2|{{arma2}}]]''' waypoints for players were mostly replaced by [[Task]]s; since '''[[{{arma3}}]]''' the [[Arma 3 Task Framework|Task Framework]] allows for an easy usage of them.


'''On Activation''' expression defines action that is peformed after the waypoint is terminated.


The variable '''this''' is set during the evaluation of the condition to the primary waypoint termination condition (i.e. if the waypoint is of the type "Move" the variable <tt>this</tt> would contain the name of the lead unit, once the waypoint in reached).
== Usage ==


The array '''thisList''' is set to list of all units in the group that given waypoint is assigned to.
=== Condition ===


[[Category: Scripting_Topics ]]
The '''Condition''' is [[Code]] that determines whether the waypoint is completed.<br>
Its value is evaluated '''[[Multiplayer Scripting#Locality|locally]]''' on the [[groupOwner|group owner]]'s machine and must return a [[Boolean]].<br>
* [[this]] refers to the group leader
* [[thisList]] refers to the group's units
 
=== OnActivation ===
 
The '''OnActivation''' is [[Code]] that is executed on '''Condition'''<nowiki/>'s completion.
{{Important | While '''Condition''' code is evaluated on the [[groupOwner|group owner]]'s machine, '''OnActivation''' code is executed '''[[Multiplayer Scripting#Locality|globally]]''', a.k.a on every client!}}
 
 
== See Also ==
 
* [[:Category:Command Group: Waypoints|Waypoints Commands]]
* [[:Category:Function Group: Waypoints|Waypoints Functions]]
 
 
[[Category: Scripting Topics]]

Revision as of 21:29, 18 September 2019

Waypoints are a group's successive destination/task indicator (see setWaypointType for a list of available types). They are represented as an Array in Waypoint format [group, index].

Since Arma 2 waypoints for players were mostly replaced by Tasks; since Arma 3 the Task Framework allows for an easy usage of them.


Usage

Condition

The Condition is Code that determines whether the waypoint is completed.
Its value is evaluated locally on the group owner's machine and must return a Boolean.

  • this refers to the group leader
  • thisList refers to the group's units

OnActivation

The OnActivation is Code that is executed on Condition's completion.

While Condition code is evaluated on the group owner's machine, OnActivation code is executed globally, a.k.a on every client!


See Also