{"name":"createGuardedPoint","operator":null,"title":"createGuardedPoint","type":"command","url":"https://community.bistudio.com/wiki/createGuardedPoint","revid":348606,"updated":"2023-11-08T13:45:17Z","groups":["Waypoints"],"status":"ok","replaced_by":[],"games":[{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"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:\n- 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.\n- 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.\n- 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.\nTo be used with \"GUARD\" waypoint.\n\n> [!NOTE]\n> To know how does the \"GUARD\" waypoint work, see Waypoint:Guard.","syntaxes":[{"syntax":"createGuardedPoint [side, position, objectMapID, vehicle]","since":null,"effect":null,"exec":null,"params":[{"name":"side","type":"Side","optional":false,"default":null,"description":"the side which will be guarding","types":["Side"],"since":null,"text":"side: Side - the side which will be guarding"},{"name":"position","type":"Object, Group, Position2D or Position3D","optional":false,"default":null,"description":null,"types":["Object","Group","Position2D","Position3D"],"since":null,"text":"position: Object, Group, Position2D or Position3D"},{"name":"objectMapID","type":"Number","optional":false,"default":null,"description":"static id of map object. -1 to ignore","types":["Number"],"since":null,"text":"objectMapID: Number - static id of map object. -1 to ignore"},{"name":"vehicle","type":"Object","optional":false,"default":null,"description":"vehicle to be used for position. objNull to ignore","types":["Object"],"since":null,"text":"vehicle: Object - vehicle to be used for position. objNull to ignore"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"[side, position, objectMapID, vehicle]","types":["Array"]}}],"examples":[{"text":"```sqf\ncreateGuardedPoint [east, [0,0], -1, vehicle player];\n```","code":["createGuardedPoint [east, [0,0], -1, vehicle player];"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["createTrigger","addWaypoint","setWaypointType"],"notes":[],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Waypoints","Introduced with Operation Flashpoint: Elite version 1.00","Operation Flashpoint: Elite: New Scripting Commands","Operation Flashpoint: Elite: Scripting Commands","Scripting Commands","Take On Helicopters: Scripting Commands"]}