{"name":"createGuardedPoint","title":"createGuardedPoint","type":"command","url":"https://community.bistudio.com/wiki/createGuardedPoint","revid":348606,"updated":"2023-11-08T13:45:17Z","groups":["Waypoints"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","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\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.\n\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]","params":[{"name":"side","type":"Side","description":"the side which will be guarding","type_expr":"Side"},{"name":"position","type":"Object, Group, Position2D or Position3D","type_expr":"Object | Group | Position2D | Position3D"},{"name":"objectMapID","type":"Number","description":"static id of map object. -1 to ignore","type_expr":"Number"},{"name":"vehicle","type":"Object","description":"vehicle to be used for position. objNull to ignore","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[side, position, objectMapID, vehicle]"}}],"examples":[{"code":["createGuardedPoint [east, [0,0], -1, vehicle player];"]}],"see_also":["createTrigger","addWaypoint","setWaypointType"]}