setCurrentWaypoint: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Text replacement - "<code>([a-zA-Z0-9_, ]+) +\[\[([a-zA-Z0-9_]+)\]\] +(\[[a-zA-Z0-9_, ]+\]);?<\/code>" to "<sqf>$1 $2 $3;</sqf>")
 
(76 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma |= Game name
|game1= arma1
|version1= 1.05


|1.05|= Game version
|game2= arma2
|version2= 1.00


|arg= local |= Arguments in MP
|game3= arma2oa
|version3= 1.50


____________________________________________________________________________________________
|game4= tkoh
|version4= 1.00


| Sets the currently active waypoint for a group. |= Description
|game5= arma3
____________________________________________________________________________________________
|version5= 0.50


| groupName '''setCurrentWaypoint''' waypoint |= Syntax
|arg= local


|p1= groupName: [[Object]] or [[Group]] |= Parameter 1
|gr1= Waypoints
|p2= waypoint: [[Array]] - format [[Waypoint]] |= Parameter 2


| [[Nothing]] |= Return value
|descr= Sets the currently active waypoint for a group.
____________________________________________________________________________________________
 
|x1= <pre>_grp setCurrentWaypoint [_grp, 1]</pre> |= Example 1
____________________________________________________________________________________________


| [[waypoints]], [[waypointCurrent (VBS2)]] |= See also
|s1= groupName [[setCurrentWaypoint]] waypoint


|p1= groupName: [[Object]] or [[Group]]
|p2= waypoint: [[Array]] - format [[Waypoint]]
|r1= [[Nothing]]
|x1= <sqf>_grp setCurrentWaypoint [_grp, 1];</sqf>
|seealso= [[waypoints]] [[deleteWaypoint]] [[copyWaypoints]] [[setWaypointBehaviour]] [[setWaypointCombatMode]] [[setWaypointCompletionRadius]] [[setWaypointDescription]] [[setWaypointFormation]] [[setWaypointHousePosition]] [[setWaypointPosition]] [[setWaypointScript]] [[setWaypointSpeed]] [[setWaypointStatements]] [[setWaypointTimeout]] [[setWaypointType]] [[setWaypointVisible]] [[waypointAttachVehicle]] [[waypointAttachedVehicle]] [[setWaypointLoiterRadius]] [[waypointLoiterRadius]] [[addWaypoint]] [[setWaypointLoiterType]] [[waypointSpeed]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->


<dd class="notedate"></dd>
<dt></dt>
<dt class="note">'''[[User:Galzohar|Galzohar]]'''</dt>
<dd class="notedate">Posted on 27 Aug 2007</dd>
<dt class="note">[[User:Way|Way]]</dt>
<dd class="note">
(A1 1.08) Does not seem to work with Game Logic. Crashes to desktop.
<dt><dt>
<dd class="notedate">Posted on 26 Nov 2008</dd>
<dt class="note">[[User:Ceeeb|Ceeeb]]</dt>
<dd class="note">
<dd class="note">
This command will '''crash the game''' to desktop with no error message (only "stack overflow" is shown in the RPT file) if you call it from the on act field of a waypoint that belongs to that same unit. It also seems to crash in other situations when called from code written in the editor but I couldn't figure out how to reproduce it. Executing a script that will then execute this command does not crash the game, but causes issues that aren't a whole lot worse than crashing - Mostly it seems to somehow overload the server as well as clients which makes other scripts not really function as intended. I suggest never using this command (at least right as a unit reached its waypoint) unless someone knows exactly what is wrong with it and how to avoid it.<br><br>
Note that a waypoints number as seen in the mission editor is not the same as it is waypoint number using this command. In the mission editor, waypoint 0 refers to the first placed waypoint, whereas waypoint 0 with the setCurrentWaypoint command refers to the unit's initial position waypoint.
Tested on Arma 2 vanilla 1.05.</dd>
<dt><dt>
 
<dd class="notedate">Posted on 17 Jan 2010</dd>
<dd class="notedate"></dd>
<dt class="note">[[User:Galzohar|Galzohar]]</dt>
<dt class="note">'''[[User:Ceeeb|Ceeeb]]'''</dt>
<dd class="note">
<dd class="note">
Note that a waypoints number as seen in the mission editor is not the same as it's waypoint number using this command. In the mission editor, waypoint 0 refers to the first placed waypoint, whereas waypoint 0 with the setCurrentWaypoint command refers to the unit's initial position waypoint.</dd>
(A2 1.05) This command may crash the game to desktop if you call it from the on act field of a waypoint that belongs to that same unit.  
 
<dt><dt>
<dd class="notedate"></dd>
<dd class="notedate">Posted on 13 Aug 2012</dd>
<dt class="note">'''[[User:Way|Way]]'''</dt>
<dt class="note">[[User:Igneous01|Igneous01]]</dt>
<dd class="note">
<dd class="note">
Does not seem to work with Game Logic as of ArmA v1.08. Crashes to desktop.</dd>
Using this command forces the last waypoint to complete. Any code in the on Act of that waypoint will run.  
<!-- Note Section END -->
</dl>
</dl>
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Waypoints|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands VBS2|{{uc:{{PAGENAME}}}}]]

Latest revision as of 14:23, 5 May 2022

Hover & click on the images for description

Description

Description:
Sets the currently active waypoint for a group.
Groups:
Waypoints

Syntax

Syntax:
groupName setCurrentWaypoint waypoint
Parameters:
groupName: Object or Group
waypoint: Array - format Waypoint
Return Value:
Nothing

Examples

Example 1:
_grp setCurrentWaypoint [_grp, 1];

Additional Information

See also:
waypoints deleteWaypoint copyWaypoints setWaypointBehaviour setWaypointCombatMode setWaypointCompletionRadius setWaypointDescription setWaypointFormation setWaypointHousePosition setWaypointPosition setWaypointScript setWaypointSpeed setWaypointStatements setWaypointTimeout setWaypointType setWaypointVisible waypointAttachVehicle waypointAttachedVehicle setWaypointLoiterRadius waypointLoiterRadius addWaypoint setWaypointLoiterType waypointSpeed

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 27 Aug 2007
Way
(A1 1.08) Does not seem to work with Game Logic. Crashes to desktop.
Posted on 26 Nov 2008
Ceeeb
Note that a waypoints number as seen in the mission editor is not the same as it is waypoint number using this command. In the mission editor, waypoint 0 refers to the first placed waypoint, whereas waypoint 0 with the setCurrentWaypoint command refers to the unit's initial position waypoint.
Posted on 17 Jan 2010
Galzohar
(A2 1.05) This command may crash the game to desktop if you call it from the on act field of a waypoint that belongs to that same unit.
Posted on 13 Aug 2012
Igneous01
Using this command forces the last waypoint to complete. Any code in the on Act of that waypoint will run.