setWaypointType: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(note deleted at poster's request)
m (Text replacement - "(\|[pr][0-9]+ *= *[^- ]*) *- *W([a-z ])" to "$1 - w$2")
(44 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


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


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


| Changes the waypoint type.  
|game3= arma2oa
|version3= 1.50


Type can be:
|game4= tkoh
* "MOVE"
|version4= 1.00
* "DESTROY"
* "GETIN"
* "SAD"
* "JOIN"
* "LEADER"
* "GETOUT"
* "CYCLE"
* "LOAD"
* "UNLOAD"
* "TR UNLOAD"
* "HOLD"
* "SENTRY"
* "GUARD" (for use with GUARDED BY trigger or [[createGuardedPoint]])
* "TALK"
* "SCRIPTED"
* "SUPPORT"
* "GETIN NEAREST"
* "DISMISS"
* "LOITER" ''(new in Arma 3)''
* "AND" ''(only for game logics)''
* "OR" ''(only for game logics)''


More details at [[Waypoint types]]. |= Description
|game5= arma3
____________________________________________________________________________________________
|version5= 0.50


| waypoint '''setWaypointType''' type |= Syntax
|gr1= Waypoints


|p1= waypoint: [[Array]] - format [[Waypoint]] |= Parameter 1
|descr= Sets the waypoint type of given waypoint.


|p2= type: [[String]] |= Parameter 2
More details at [[Waypoints]].


| [[Nothing]] |= Return value
|s1= waypoint [[setWaypointType]] type
____________________________________________________________________________________________
 
|x1= <code>[_grp, 2] [[setWaypointType]] "HOLD";</code> |= Example 1
____________________________________________________________________________________________


| [[Mission_Editor:_Waypoints#Select_Type|waypoints description]], [[Waypoint types]], [[waypoints]], [[deleteWaypoint]], [[copyWaypoints]], [[setCurrentWaypoint]], [[setWaypointBehaviour]], [[setWaypointCombatMode]], [[setWaypointCompletionRadius]], [[setWaypointDescription]], [[setWaypointFormation]], [[setWaypointHousePosition]], [[setWaypointPosition]], [[setWaypointScript]], [[setWaypointSpeed]], [[setWaypointStatements]], [[setWaypointTimeout]], [[setWaypointVisible]], [[waypointAttachVehicle]], [[waypointAttachedVehicle]], [[setWaypointLoiterRadius]], [[waypointLoiterRadius]], [[addWaypoint]], [[setWaypointLoiterType]], [[waypointSpeed]], [[createGuardedPoint]] |= See also
|p1= waypoint: [[Array]] - format [[Waypoint]]


|p2= type: [[String]] - waypoint type. Can be:
{{Columns|4|
* {{hl|"MOVE"}}
* {{hl|"DESTROY"}}
* {{hl|"GETIN"}}
* {{hl|"SAD"}} ''(Seek And Destroy)''
* {{hl|"JOIN"}}
* {{hl|"LEADER"}}
* {{hl|"GETOUT"}}
* {{hl|"CYCLE"}}
* {{hl|"LOAD"}}
* {{hl|"UNLOAD"}}
* {{hl|"TR UNLOAD"}}
* {{hl|"HOLD"}}
* {{hl|"SENTRY"}}
* {{hl|"GUARD"}} <small>(for use with GUARDED BY trigger or [[createGuardedPoint]])</small>
* {{hl|"TALK"}}
* {{hl|"SCRIPTED"}}
* {{hl|"SUPPORT"}}
* {{hl|"GETIN NEAREST"}}
* {{hl|"DISMISS"}}
* {{hl|"LOITER"}} <small>({{arma3}})</small>
* {{hl|"HOOK"}} <small>({{arma3}}) - slingload object</small>
* {{hl|"UNHOOK"}} <small>({{arma3}}) - drop slingload</small>
* {{hl|"AND"}} <small>(only for game logics)</small>
* {{hl|"OR"}} <small>(only for game logics)</small>
}}
}}


<h3 style="display:none">Notes</h3>
|r1= [[Nothing]]
<dl class="command_description">
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on 07:44, 23 November 2007
<dt class="note">[[User:User:ArmAtec|ArmAtec]]
<dd class="note">
For '''waypoint types''' description look at
*[[ArmA: Mission_Editor#Select_Type | ArmA: Mission_Editor]]
*[[Mission_Editor_User_Interface_%28OFP%29#Waypoints | OFP: Mission_Editor]]
Using Move With a game logic group will move the logic to the set location just like setpos. In the editor only AND and OR type of waypoints are available for GAME LOGICS but you can use CYCLE type as well in setWaypointType.
<code>_wp = [[group]] logic1 [[addWaypoint]] [ [[getPos]] [[player]], 1];
[ [[group]] logic1, 1] [[setWPPos]] [[getPos]] [[player]];
[ [[group]] logic1, 1] [[setWaypointType]] "move";</code>


<dd class="notedate">Posted on 23:07, 18 October 2013 (CEST)
|x1= <sqf>_myWaypoint setWaypointType "HOLD";</sqf>
<dt class="note">'''[[User:JacmacBrian|Jacmac]]'''
<dd class="note">To clear up any confusion regarding the syntax, follow this example where grp01 is the name of a group of AI units:
<code>_wp = grp01 [[addWaypoint]] [[25295,21919,85], 0];
_wp [[setWaypointType]] "MOVE";  
_wp1 = grp01 [[addWaypoint]] [[25381,21882,70], 0]; 
_wp1 [[setWaypointType]] "MOVE";
_wp2 = grp01 [[addWaypoint]] [[ 25332,21782,78], 0];
_wp2 [[setWaypointType]] "CYCLE"; //Use the variable (_wp2), not [grp01, 0]</code>
<!-- Note Section END -->
</dl>


<h3 style="display:none">Bottom Section</h3>
|seealso= [[2D Editor: Waypoints#Select Type|Waypoints Types]] [[waypointType]]
[[Category:Scripting Commands|SETWAYPOINTTYPE]]
}}
[[Category:Scripting Commands OFP Elite |SETWAYPOINTTYPE]]
[[Category:Scripting Commands ArmA|SETWAYPOINTTYPE]]
[[Category:Command_Group:_Waypoints|SETWAYPOINTTYPE]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]


<!-- CONTINUE Notes -->
<dl class="command_description">
<dl class="command_description">
<dd class="notedate">Posted on December 22, 2015 - 14:38 (UTC)</dd>
 
<dt class="note">[[User:DrPastah|DrPastah]]</dt>
<dt></dt>
<dd class="notedate">Posted on 07:44, 23 November 2007</dd>
<dt class="note">[[User:User:ArmAtec|ArmAtec]]</dt>
<dd class="note">
<dd class="note">
[[User:DrPastah#Helicopter Transport Script|To spawn a helicopter with troops inside and make them land and unload.]]
Using '''MOVE''' on a game logic group will move the logic to the set location just like [[setPos]]. In the editor, only '''AND''' and '''OR''' type of waypoints are available for GAME LOGICS but you can use CYCLE type as well with [[setWaypointType]].
</dd>
</dd>
</dl>
<!-- DISCONTINUE Notes -->


<!-- CONTINUE Notes -->
<dt><dt>
<dl class="command_description">
<dd class="notedate">Posted on 2017-05-06 - 16:09 (UTC)</dd>
<dd class="notedate">Posted on May 6, 2017 - 16:09 (UTC)</dd>
<dt class="note">[[User:RHfront|RHfront]]</dt>
<dt class="note">[[User:RHfront|RHfront]]</dt>
<dd class="note">
<dd class="note">
To use the '''LAND''' function in a waypoint, you must set ''"A3\functions_f\waypoints\fn_wpLand.sqf"'' as the script for that waypoint.
To use the '''LAND''' function in a waypoint, you must set ''"A3\functions_f\waypoints\fn_wpLand.sqf"'' as the script for that waypoint.
</dd>
</dd>
<dt><dt>
<dd class="notedate">Posted on 2017-05-30 - 09:14 (UTC)</dd>
<dt class="note">[[User:IT07|IT07]]</dt>
<dd class="note">
In '''Arma 3 v1.70''', if you add a '''MOVE''' waypoint very soon after a '''LOITER''' waypoint, (assuming that the index of the MOVE waypoint is HIGHER than the index of the LOITER waypoint) then the LOITER waypoint will be considered as a MOVE waypoint.<br>
And, if you add another waypoint after ( for example ) more than 1 second after adding the LOITER waypoint,
then the LOITER waypoint will NOT complete even when its condition has been met.<br>
There are two ways to quit an existing LOITER waypoint that was added more than about 1 second ago:
* use the [[setCurrentWaypoint]] command
* add a waypoint that has the same ID as the LOITER waypoint.
The difference between those two methods is that the latter prevents the LOITER waypoint from executing its statement.
</dd>
</dl>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 17:35, 8 November 2023

Hover & click on the images for description

Description

Description:
Sets the waypoint type of given waypoint. More details at Waypoints.
Groups:
Waypoints

Syntax

Syntax:
waypoint setWaypointType type
Parameters:
waypoint: Array - format Waypoint
type: String - waypoint type. Can be:
  • "MOVE"
  • "DESTROY"
  • "GETIN"
  • "SAD" (Seek And Destroy)
  • "JOIN"
  • "LEADER"
  • "GETOUT"
  • "CYCLE"
  • "LOAD"
  • "UNLOAD"
  • "TR UNLOAD"
  • "HOLD"
  • "SENTRY"
  • "GUARD" (for use with GUARDED BY trigger or createGuardedPoint)
  • "TALK"
  • "SCRIPTED"
  • "SUPPORT"
  • "GETIN NEAREST"
  • "DISMISS"
  • "LOITER" (Arma 3)
  • "HOOK" (Arma 3) - slingload object
  • "UNHOOK" (Arma 3) - drop slingload
  • "AND" (only for game logics)
  • "OR" (only for game logics)
Return Value:
Nothing

Examples

Example 1:
_myWaypoint setWaypointType "HOLD";

Additional Information

See also:
Waypoints Types waypointType

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 07:44, 23 November 2007
ArmAtec
Using MOVE on a game logic group will move the logic to the set location just like setPos. In the editor, only AND and OR type of waypoints are available for GAME LOGICS but you can use CYCLE type as well with setWaypointType.
Posted on 2017-05-06 - 16:09 (UTC)
RHfront
To use the LAND function in a waypoint, you must set "A3\functions_f\waypoints\fn_wpLand.sqf" as the script for that waypoint.
Posted on 2017-05-30 - 09:14 (UTC)
IT07
In Arma 3 v1.70, if you add a MOVE waypoint very soon after a LOITER waypoint, (assuming that the index of the MOVE waypoint is HIGHER than the index of the LOITER waypoint) then the LOITER waypoint will be considered as a MOVE waypoint.
And, if you add another waypoint after ( for example ) more than 1 second after adding the LOITER waypoint, then the LOITER waypoint will NOT complete even when its condition has been met.
There are two ways to quit an existing LOITER waypoint that was added more than about 1 second ago:
  • use the setCurrentWaypoint command
  • add a waypoint that has the same ID as the LOITER waypoint.
The difference between those two methods is that the latter prevents the LOITER waypoint from executing its statement.