createGuardedPoint: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\| *(arg|eff|mp|serverExec|gr[0-9]) *= *(.*) * *\|([^=]{12})" to "|$1=$2 |descr=$3") |
Lou Montana (talk | contribs) m (Text replacement - "(\|[pr][0-9]+ *= *[^-\r\n]+) *- *T([a-z])" to "$1 - t$2") |
||
(18 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{RV|type=command | {{RV|type=command | ||
| ofpe | |game1= ofpe | ||
| 1.00 | |version1= 1.00 | ||
|game2= arma1 | |game2= arma1 | ||
Line 21: | Line 21: | ||
|gr1= Waypoints | |gr1= Waypoints | ||
|descr= Adds a point guarded by the given side (scripted way of adding equivalent of "GUARDED BY" trigger in [[ | |descr= Adds a point guarded by the given side (scripted way of adding equivalent of "GUARDED BY" trigger in [[:Category:Eden Editor|Editor]]). A closest AI group in the given side with assigned "GUARD" waypoint will attempt to secure this guard point. The actual guarded position is determined via the following rules: | ||
* Given "position" is always considered. It could be [[Object]], [[Group]], [[Position2D]] or [[Position3D]]. In every case, z coordinate will be ignored and point will be placed on nearest surface. | * Given "position" is always considered. It could be [[Object]], [[Group]], [[Position#Introduction|Position2D]] or [[Position#Introduction|Position3D]]. In every case, z coordinate will be ignored and point will be placed on nearest surface. | ||
* If "objectMapID" is not negative, the position of the object with the given ID is used (Overrides "position"). -1 to ignore this argument. z of the object position will be intact. | * If "objectMapID" is not negative, the position of the object with the given ID is used (Overrides "position"). -1 to ignore this argument. z of the object position will be intact. | ||
* If the given "vehicle" is valid, the position of the vehicle is extracted and guarded (Overrides both "position" and "objectMapID"). [[objNull]] to ignore. z of the vehicle position will be intact. | * If the given "vehicle" is valid, the position of the vehicle is extracted and guarded (Overrides both "position" and "objectMapID"). [[objNull]] to ignore. z of the vehicle position will be intact. | ||
To be used with "GUARD" [[setWaypointType|waypoint]]. | |||
{{Feature|informative|To know how does the "GUARD" waypoint work, see [[Waypoint:Guard]].}} | |||
|s1= | |s1= [[createGuardedPoint]] [side, position, objectMapID, vehicle] | ||
|p1 | |p1= side: [[Side]] - the side which will be guarding | ||
| | |p2= position: [[Object]], [[Group]], [[Position#Introduction|Position2D]] or [[Position#Introduction|Position3D]] | ||
| | |p3= objectMapID: [[Number]] - static id of map object. -1 to ignore | ||
| | |p4= vehicle: [[Object]] - vehicle to be used for position. [[objNull]] to ignore | ||
|r1= [[Nothing]] | |||
|x1= <sqf>createGuardedPoint [east, [0,0], -1, vehicle player];</sqf> | |||
|seealso= [[createTrigger]] [[addWaypoint]] [[setWaypointType]] | |||
}} | |||
Latest revision as of 14:45, 8 November 2023
Description
- Description:
- Adds a point guarded by the given side (scripted way of adding equivalent of "GUARDED BY" trigger in Editor). A closest AI group in the given side with assigned "GUARD" waypoint will attempt to secure this guard point. The actual guarded position is determined via the following rules:
- Given "position" is always considered. It could be Object, Group, Position2D or Position3D. In every case, z coordinate will be ignored and point will be placed on nearest surface.
- If "objectMapID" is not negative, the position of the object with the given ID is used (Overrides "position"). -1 to ignore this argument. z of the object position will be intact.
- If the given "vehicle" is valid, the position of the vehicle is extracted and guarded (Overrides both "position" and "objectMapID"). objNull to ignore. z of the vehicle position will be intact.
- Groups:
- Waypoints
Syntax
- Syntax:
- createGuardedPoint [side, position, objectMapID, vehicle]
- Parameters:
- side: Side - the side which will be guarding
- position: Object, Group, Position2D or Position3D
- objectMapID: Number - static id of map object. -1 to ignore
- vehicle: Object - vehicle to be used for position. objNull to ignore
- Return Value:
- Nothing
Examples
- Example 1:
Additional Information
- See also:
- createTrigger addWaypoint setWaypointType
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
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint: Elite version 1.00
- Operation Flashpoint: Elite: New Scripting Commands
- Operation Flashpoint: Elite: Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Waypoints