createGuardedPoint: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "| arma |" to "| arma1 |")
m (Text replacement - "(\|[pr][0-9]+ *= *[^-\r\n]+) *- *T([a-z])" to "$1 - t$2")
 
(39 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


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


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


|gr1= Waypoints |GROUP1=
|game3= arma2
____________________________________________________________________________________________
|version3= 1.00


| Adds a point guarded by the given side (scripted way of adding equivalent of "GUARDED BY" trigger in [[3DEN|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:
|game4= arma2oa
* 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.
|version4= 1.50
 
|game5= tkoh
|version5= 1.00
 
|game6= arma3
|version6= 0.50
 
|gr1= Waypoints
 
|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]], [[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.
For use with "GUARD" [[setWaypointType|waypoint]]. How does "GUARD" waypoint work: [[Waypoint:Guard]]
To be used with "GUARD" [[setWaypointType|waypoint]].
|DESCRIPTION=
{{Feature|informative|To know how does the "GUARD" waypoint work, see [[Waypoint:Guard]].}}
____________________________________________________________________________________________


| '''createGuardedPoint''' [side, position, objectMapID, vehicle] |SYNTAX=
|s1= [[createGuardedPoint]] [side, position, objectMapID, vehicle]


|p1=  [side, position, idStatic, vehicle]: [[Array]] |PARAMETER1=
|p1= side: [[Side]] - the side which will be guarding
|p2= side: [[Side]] - The side which will be guarding |PARAMETER2=
|p3= position: [[Position]] - [[Object]], [[Group]], [[Position2D]] or [[Position3D]]|PARAMETER3=
|p4= objectMapID: [[Number]] - static id of map object. -1 to ignore |PARAMETER4=
|p5= vehicle: [[Object]] - vehicle to be used for position. [[objNull]] to ignore |PARAMETER5=


| [[Nothing]] |RETURNVALUE=
|p2= position: [[Object]], [[Group]], [[Position#Introduction|Position2D]] or [[Position#Introduction|Position3D]]
____________________________________________________________________________________________
 
|x1= <code>[[createGuardedPoint]] [<nowiki/>[[east]], [0,0], -1, [[vehicle]] [[player]]];</code> |EXAMPLE1=
____________________________________________________________________________________________


|[[createTrigger]], [[addWaypoint]], [[setWaypointType]] |SEEALSO=
|p3= objectMapID: [[Number]] - static id of map object. -1 to ignore


}}
|p4= vehicle: [[Object]] - vehicle to be used for position. [[objNull]] to ignore


<h3 style="display:none">Notes</h3>
|r1= [[Nothing]]
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|x1= <sqf>createGuardedPoint [east, [0,0], -1, vehicle player];</sqf>
</dl>


<h3 style="display:none">Bottom Section</h3>
|seealso= [[createTrigger]] [[addWaypoint]] [[setWaypointType]]
 
}}
[[Category:Scripting Commands|CREATEGUARDEDPOINT]]
[[Category:Scripting Commands OFP Elite |CREATEGUARDEDPOINT]]
[[Category:Scripting Commands Armed Assault|CREATEGUARDEDPOINT]]
 
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]

Latest revision as of 15:45, 8 November 2023

Hover & click on the images for description

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.
To be used with "GUARD" waypoint.
To know how does the "GUARD" waypoint work, see Waypoint:Guard.
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:
createGuardedPoint [east, [0,0], -1, vehicle player];

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