setWaypointScript: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game name" to "|Game name=")
m (Some wiki formatting)
 
(60 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


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


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


| Attaches a script to a scripted waypoint. In early versions of Arma, command consisted of a script name and additional script arguments and the script had to use [[SQS]]-Syntax. The script receives the following arguments in [[_this]] variable: [group, position, target] + [the optional passed arguments]. The optional arguments are [[append]]ed to the end of the return array.<br><br>
|game3= arma2
In Arma 3, ''command'' argument can be a [[String]] with code, a reference to .sqf script (it will have to explicitly end with '''.sqf''') or a reference to .sqs script.<br><br>
|version3= 1.00
See [[ArmA:_Mission_Editor#Select_Type|Mission editor Description]] for more information about scripted waypoints. |DESCRIPTION=
____________________________________________________________________________________________


| waypoint '''setWaypointScript''' command |SYNTAX=
|game4= arma2oa
|version4= 1.50


|p1= waypoint: [[Array]] - format [[Waypoint]] |PARAMETER1=
|game5= tkoh
|version5= 1.00


|p2= command: [[String]] |PARAMETER2=
|game6= arma3
|version6= 0.50


| [[Nothing]] |RETURNVALUE=
|gr1= Waypoints
____________________________________________________________________________________________
 
|x1= <code>[_grp, 2] [[setWaypointScript]] "find.sqs [[player]]";</code> |EXAMPLE1=
|x2= <code>[_grp, 2] [[setWaypointScript]] "somescript.sqf [1,2,3,4,5,6,7,8]";</code> |EXAMPLE1=
____________________________________________________________________________________________


| [[waypoints]], [[deleteWaypoint]], [[copyWaypoints]], [[setCurrentWaypoint]], [[setWaypointBehaviour]], [[setWaypointCombatMode]], [[setWaypointCompletionRadius]], [[setWaypointDescription]], [[setWaypointFormation]], [[setWaypointHousePosition]], [[setWaypointPosition]], [[setWaypointSpeed]], [[setWaypointStatements]], [[setWaypointTimeout]], [[setWaypointType]], [[setWaypointVisible]], [[waypointAttachVehicle]], [[waypointAttachedVehicle]], [[setWaypointLoiterRadius]], [[waypointLoiterRadius]], [[addWaypoint]], [[setWaypointLoiterType]], [[waypointSpeed]] |SEEALSO=
|descr= Attaches a script to a scripted waypoint. In early versions of Arma, command consisted of a script name and additional script arguments and the script had to use [[SQS Syntax]]. The script receives the following arguments in [[Magic Variables#this|_this]] variable: [group, position, target] + [the optional passed arguments]. The optional arguments are [[append]]ed to the end of the arguments array.
{{Feature|arma3|In Arma 3, ''command'' argument can be a reference to .sqf script (it will have to explicitly end with '''{{hl|.sqf}}''') or a reference to {{hl|.sqs}} script.}}


}}
|s1= waypoint [[setWaypointScript]] command
 
|p1= waypoint: [[Array]] - format [[Waypoint]]
 
|p2= command: [[String]]
 
|r1= [[Nothing]]


<h3 style="display:none">Notes</h3>
|x1= <sqf>[_grp, 2] setWaypointScript "find.sqs player";</sqf>
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|x2= <sqf>[_grp, 2] setWaypointScript "somescript.sqf [1,2,3,4,5,6,7,8]";</sqf>
</dl>


<h3 style="display:none">Bottom Section</h3>
|seealso= [[waypoints]] [[deleteWaypoint]] [[copyWaypoints]] [[setCurrentWaypoint]] [[setWaypointBehaviour]] [[setWaypointCombatMode]] [[setWaypointCompletionRadius]] [[setWaypointDescription]] [[setWaypointFormation]] [[setWaypointHousePosition]] [[setWaypointPosition]] [[setWaypointSpeed]] [[setWaypointStatements]] [[setWaypointTimeout]] [[setWaypointType]] [[setWaypointVisible]] [[waypointAttachVehicle]] [[waypointAttachedVehicle]] [[setWaypointLoiterRadius]] [[waypointLoiterRadius]] [[addWaypoint]] [[setWaypointLoiterType]] [[waypointSpeed]]
[[Category:Scripting Commands|SETWAYPOINTSCRIPT]]
}}
[[Category:Scripting Commands OFP Elite |SETWAYPOINTSCRIPT]]
[[Category:Scripting Commands ArmA|SETWAYPOINTSCRIPT]]
[[Category:Command_Group:_Waypoints|SETWAYPOINTSCRIPT]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]

Latest revision as of 23:59, 10 July 2022

Hover & click on the images for description

Description

Description:
Attaches a script to a scripted waypoint. In early versions of Arma, command consisted of a script name and additional script arguments and the script had to use SQS Syntax. The script receives the following arguments in _this variable: [group, position, target] + [the optional passed arguments]. The optional arguments are appended to the end of the arguments array.
Arma 3
In Arma 3, command argument can be a reference to .sqf script (it will have to explicitly end with .sqf) or a reference to .sqs script.
Groups:
Waypoints

Syntax

Syntax:
waypoint setWaypointScript command
Parameters:
waypoint: Array - format Waypoint
command: String
Return Value:
Nothing

Examples

Example 1:
[_grp, 2] setWaypointScript "find.sqs player";
Example 2:
[_grp, 2] setWaypointScript "somescript.sqf [1,2,3,4,5,6,7,8]";

Additional Information

See also:
waypoints deleteWaypoint copyWaypoints setCurrentWaypoint setWaypointBehaviour setWaypointCombatMode setWaypointCompletionRadius setWaypointDescription setWaypointFormation setWaypointHousePosition setWaypointPosition 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