setWaypointScript: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<h3 style="display:none">Bottom Section</h3> " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| arma1 |Game name=
| arma1


|1.00|Game version=
|1.00


|gr1= Waypoints |GROUP1=
|gr1= Waypoints


| 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 arguments array.
| 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 arguments array.
{{Feature|arma3|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.}} |DESCRIPTION=
{{Feature|arma3|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.}}


| waypoint [[setWaypointScript]] command |SYNTAX=
| waypoint [[setWaypointScript]] command


|p1= waypoint: [[Array]] - format [[Waypoint]] |PARAMETER1=
|p1= waypoint: [[Array]] - format [[Waypoint]]


|p2= command: [[String]] |PARAMETER2=
|p2= command: [[String]]


| [[Nothing]] |RETURNVALUE=
| [[Nothing]]
   
   
|x1= <code>[_grp, 2] [[setWaypointScript]] "find.sqs [[player]]";</code> |EXAMPLE1=
|x1= <code>[_grp, 2] [[setWaypointScript]] "find.sqs [[player]]";</code>


|x2= <code>[_grp, 2] [[setWaypointScript]] "somescript.sqf [1,2,3,4,5,6,7,8]";</code> |EXAMPLE2=
|x2= <code>[_grp, 2] [[setWaypointScript]] "somescript.sqf [1,2,3,4,5,6,7,8]";</code>


| [[waypoints]], [[deleteWaypoint]], [[copyWaypoints]], [[setCurrentWaypoint]], [[setWaypointBehaviour]], [[setWaypointCombatMode]], [[setWaypointCompletionRadius]], [[setWaypointDescription]], [[setWaypointFormation]], [[setWaypointHousePosition]], [[setWaypointPosition]], [[setWaypointSpeed]], [[setWaypointStatements]], [[setWaypointTimeout]], [[setWaypointType]], [[setWaypointVisible]], [[waypointAttachVehicle]], [[waypointAttachedVehicle]], [[setWaypointLoiterRadius]], [[waypointLoiterRadius]], [[addWaypoint]], [[setWaypointLoiterType]], [[waypointSpeed]] |SEEALSO=
| [[waypoints]], [[deleteWaypoint]], [[copyWaypoints]], [[setCurrentWaypoint]], [[setWaypointBehaviour]], [[setWaypointCombatMode]], [[setWaypointCompletionRadius]], [[setWaypointDescription]], [[setWaypointFormation]], [[setWaypointHousePosition]], [[setWaypointPosition]], [[setWaypointSpeed]], [[setWaypointStatements]], [[setWaypointTimeout]], [[setWaypointType]], [[setWaypointVisible]], [[waypointAttachVehicle]], [[waypointAttachedVehicle]], [[setWaypointLoiterRadius]], [[waypointLoiterRadius]], [[addWaypoint]], [[setWaypointLoiterType]], [[waypointSpeed]]


}}
}}

Revision as of 12:24, 18 January 2021

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

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