killerwhale 1 Posted July 13, 2013 Can bis introduce such command, i know you can setheight but the unit doesnt keep its altitude. This would be great for bombing runs. Share this post Link to post Share on other sites
scarecrow398 43 Posted July 13, 2013 Flyinheight is what you want. Share this post Link to post Share on other sites
killerwhale 1 Posted July 13, 2013 i know about this command but the unit will lose its altitude if it spots enemy or it wants to engage an enemy Share this post Link to post Share on other sites
bakerman 247 Posted July 13, 2013 If you're having AI problems take a look at this page. http://community.bistudio.com/wiki/disableAI Share this post Link to post Share on other sites
zooloo75 834 Posted July 14, 2013 You can make a function that changes the unit's Z velocity if they are under or over the desired altitude. Share this post Link to post Share on other sites
zooloo75 834 Posted July 16, 2013 Here you go - just plop this in the aerial vehicle's init line. _nul = [this] spawn {_veh = _this select 0; _alt = position _veh select 2; while{alive _veh} do {sleep 0.1; if(position _veh select 2 > _alt) then {_veh setVelocity [velocity _veh select 0, velocity _veh select 1, (velocity _veh select 2) -2];}; if(position _veh select 2 < _alt) then {_veh setVelocity [velocity _veh select 0, velocity _veh select 1, (velocity _veh select 2) + 2];}};}; It's very messy code, but it works :P Share this post Link to post Share on other sites
kylania 568 Posted July 16, 2013 aircraft setDamage 1; The poor man's aircraft forceAltitude 0; :) Share this post Link to post Share on other sites
[aps]gnat 28 Posted July 17, 2013 Nice zooloo Reduces the altitude grabs by AI, but doesn't stop an aircraft climbing. (Tested on my C185) Share this post Link to post Share on other sites
zooloo75 834 Posted July 17, 2013 Gnat;2443155']Nice zoolooReduces the altitude grabs by AI' date=' but doesn't stop an aircraft climbing. (Tested on my C185)[/quote'] Maybe change the Z velocity to be dynamic based on the difference between the desired altitude and the current altitude and have it set the Z velocity to that. _nul = [this] spawn {_veh = _this select 0; _alt = position _veh select 2; while{alive _veh} do {sleep 0.1; _veh setVelocity [velocity _veh select 0, velocity _veh select 1, (velocity _veh select 2) + (_alt-(position _veh select 2))];};}; Share this post Link to post Share on other sites
killerwhale 1 Posted July 18, 2013 but dont you think bohemia should introduce forceAltitude command just like forceSpeed command? this should make it easier ---------- Post added at 17:12 ---------- Previous post was at 17:11 ---------- or holdAltitude Share this post Link to post Share on other sites
zooloo75 834 Posted July 19, 2013 but dont you think bohemia should introduce forceAltitude command just like forceSpeed command? this should make it easier---------- Post added at 17:12 ---------- Previous post was at 17:11 ---------- or holdAltitude Wouldn't hurt :) Share this post Link to post Share on other sites