{"name":"BIS_fnc_setHeight","operator":null,"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","replaced_by":[],"games":[{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Set an object's altitude.","syntaxes":[{"syntax":"[target, height, position, mode] call BIS_fnc_setHeight","since":null,"effect":null,"exec":null,"params":[{"name":"target","type":"Object","optional":false,"default":null,"description":"affected object","types":["Object"],"since":null,"text":"target: Object - affected object"},{"name":"height","type":"Number","optional":true,"default":"0","description":"height to set","types":["Number"],"since":null,"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","types":["Position"],"since":null,"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- \"ROADWAY\": uses setPos\n- \"ASL\": uses setPosASL\n- \"ATL\": uses setPosATL","types":["String"],"since":null,"text":"mode: String - (Optional, default \"ROADWAY\") can be:\n- \"ROADWAY\": uses setPos\n- \"ASL\": uses setPosASL\n- \"ATL\": uses setPosATL"}],"returns":{"type":"Boolean","types":["Boolean"],"description":"true when done","text":"Boolean - true when done"}},{"syntax":"[height, mode] call BIS_fnc_setHeight > [!IMPORTANT] > This syntax uses `this` and is therefore meant to be used in init fields. Not to be used in MP.","since":null,"effect":null,"exec":null,"params":[{"name":"height","type":"Number","optional":true,"default":"0","description":"height to set","types":["Number"],"since":null,"text":"height: Number - (Optional, default 0) height to set"},{"name":"mode","type":"String","optional":true,"default":"\"ROADWAY\"","description":"can be:\n- \"ROADWAY\": uses setPos\n- \"ASL\": uses setPosASL\n- \"ATL\": uses setPosATL","types":["String"],"since":null,"text":"mode: String - (Optional, default \"ROADWAY\") can be:\n- \"ROADWAY\": uses setPos\n- \"ASL\": uses setPosASL\n- \"ATL\": uses setPosATL"}],"returns":{"type":"Boolean","types":["Boolean"],"description":"true when done","text":"Boolean - true when done"}}],"examples":[{"text":"```sqf\n// will place player's vehicle on \"myHeightMarker\", 50m above terrain\n[vehicle player, 50, getMarkerPos \"myHeightMarker\", \"ATL\"] call BIS_fnc_setHeight;\n```","code":["// will place player's vehicle on \"myHeightMarker\", 50m above terrain\n[vehicle player, 50, getMarkerPos \"myHeightMarker\", \"ATL\"] call BIS_fnc_setHeight;"]},{"text":"```sqf\n// 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;\n```","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;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["setPos","setPosASL","setPosATL"],"notes":[],"categories":["Arma 3: Functions","Function Group: Object Manipulation","Functions","Introduced with Take On Helicopters version 1.00","Take On Helicopters: Functions","Take On Helicopters: New Functions"],"docblock":null,"filled_from_docblock":[]}