setWaypointScript: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) No edit summary |
m (template:command argument fix) |
||
Line 9: | Line 9: | ||
| 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> | | 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> | ||
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> | 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> | ||
See [[ArmA:_Mission_Editor#Select_Type|Mission editor Description]] for more information about scripted waypoints. |= | See [[ArmA:_Mission_Editor#Select_Type|Mission editor Description]] for more information about scripted waypoints. |DESCRIPTION= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| waypoint '''setWaypointScript''' command |= | | waypoint '''setWaypointScript''' command |SYNTAX= | ||
|p1= waypoint: [[Array]] - format [[Waypoint]] |= | |p1= waypoint: [[Array]] - format [[Waypoint]] |PARAMETER1= | ||
|p2= command: [[String]] |= | |p2= command: [[String]] |PARAMETER2= | ||
| [[Nothing]] |= | | [[Nothing]] |RETURNVALUE= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= <code>[_grp, 2] [[setWaypointScript]] "find.sqs [[player]]";</code> |= | |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> |= | |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]] |= | | [[waypoints]], [[deleteWaypoint]], [[copyWaypoints]], [[setCurrentWaypoint]], [[setWaypointBehaviour]], [[setWaypointCombatMode]], [[setWaypointCompletionRadius]], [[setWaypointDescription]], [[setWaypointFormation]], [[setWaypointHousePosition]], [[setWaypointPosition]], [[setWaypointSpeed]], [[setWaypointStatements]], [[setWaypointTimeout]], [[setWaypointType]], [[setWaypointVisible]], [[waypointAttachVehicle]], [[waypointAttachedVehicle]], [[setWaypointLoiterRadius]], [[waypointLoiterRadius]], [[addWaypoint]], [[setWaypointLoiterType]], [[waypointSpeed]] |SEEALSO= | ||
}} | }} |
Revision as of 14:49, 7 April 2019
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 return array.
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.
See Mission editor Description for more information about scripted waypoints. - Groups:
- Uncategorised
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