createGuardedPoint: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Bot: Reverted to revision 97879 by killzone_kid on 2016-11-13T12:57:19Z)
m (template:command argument fix)
Line 12: Line 12:
* 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]]
For use with "GUARD" [[setWaypointType|waypoint]]. How does "GUARD" waypoint work: [[Waypoint:Guard]]
  |= Description
  |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


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


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


| [[Nothing]] |= Return value
| [[Nothing]] |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <code>[[createGuardedPoint]] <nowiki>[</nowiki>[[east]], [0,0], -1, [[vehicle]] [[player]]];</code> |= Example 1
|x1= <code>[[createGuardedPoint]] <nowiki>[</nowiki>[[east]], [0,0], -1, [[vehicle]] [[player]]];</code> |EXAMPLE1=
____________________________________________________________________________________________
____________________________________________________________________________________________


|[[createTrigger]], [[addWaypoint]], [[setWaypointType]] |= See also
|[[createTrigger]], [[addWaypoint]], [[setWaypointType]] |SEEALSO=


}}
}}

Revision as of 15:36, 7 April 2019

-wrong parameter ("Arma") defined!-1.00
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.
For use with "GUARD" waypoint. How does "GUARD" waypoint work: Waypoint:Guard
Groups:
Uncategorised

Syntax

Syntax:
createGuardedPoint [side, position, objectMapID, vehicle]
Parameters:
[side, position, idStatic, vehicle]: Array
side: Side - The side which will be guarding
position: 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:
createTriggeraddWaypointsetWaypointType

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

Notes

Bottom Section