{"name":"BIS_fnc_setHeight","title":"BIS fnc setHeight","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_setHeight","revid":349594,"updated":"2023-11-13T22:41:43Z","groups":["Object Manipulation"],"status":"ok","games":{"tkoh":"1.00","arma3":"0.50"},"since":"tkoh 1.00","arma3_since":"0.50","description":"Set an object's altitude.","syntaxes":[{"syntax":"[target, height, position, mode] call BIS_fnc_setHeight","params":[{"name":"target","type":"Object","description":"affected object","type_expr":"Object"},{"name":"height","type":"Number","optional":true,"default":"0","description":"height to set","type_expr":"Number","text":"height: Number - (Optional, default 0) height to set"},{"name":"position","type":"Position","optional":true,"default":"`position target`","description":"position to place the target with calculated height","type_expr":"Position","text":"position: Position - (Optional, default `position target`) position to place the target with calculated height"},{"name":"mode","type":"String","optional":true,"default":"\"ROADWAY\"","description":"can be:\n\n- \"ROADWAY\": uses setPos\n- \"ASL\": uses setPosASL\n- \"ATL\": uses setPosATL","type_expr":"String","text":"mode: String - (Optional, default \"ROADWAY\") can be:\n\n- \"ROADWAY\": uses setPos\n- \"ASL\": uses setPosASL\n- \"ATL\": uses setPosATL"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true when done"}},{"syntax":"[height, mode] call BIS_fnc_setHeight","note":"> [!IMPORTANT]\n> This syntax uses `this` and is therefore meant to be used in init fields. Not to be used in MP.","params":[{"name":"height","type":"Number","optional":true,"default":"0","description":"height to set","type_expr":"Number","text":"height: Number - (Optional, default 0) height to set"},{"name":"mode","type":"String","optional":true,"default":"\"ROADWAY\"","description":"can be:\n\n- \"ROADWAY\": uses setPos\n- \"ASL\": uses setPosASL\n- \"ATL\": uses setPosATL","type_expr":"String","text":"mode: String - (Optional, default \"ROADWAY\") can be:\n\n- \"ROADWAY\": uses setPos\n- \"ASL\": uses setPosASL\n- \"ATL\": uses setPosATL"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true when done"}}],"examples":[{"code":["// will place player's vehicle on \"myHeightMarker\", 50m above terrain\n[vehicle player, 50, getMarkerPos \"myHeightMarker\", \"ATL\"] call BIS_fnc_setHeight;"]},{"code":["// will set the \"this\" object 50m above sea level at its position\n// use where \"this\" has a value like in an init field\n[50, \"ASL\"] call BIS_fnc_setHeight;"]}],"see_also":["setPos","setPosASL","setPosATL"]}