Jump to content
Sign in to follow this  
grendel [aps]

Fixed wing ai units in Warfare.

Recommended Posts

If this has been touched on before, or is in the wrong thread, apologies.

I'm attempting to get ai units, in warfare, to buy fixed wing aircraft that are already flying.

Making alterations in the "Server\Server_BuyUnit.sqs", has led to some success, but always partial or flawed.

Altered section from Server\Server_buyUnit.sqs

#CreateVehicle

_vehicle = objNull

if ((_unit isKindOf "air") && !_empty) then {_vehicle = createVehicle [_unit, _position, [], 0, "FLY"]} else {_vehicle = _unit CreateVehicle _position};

_vehicle SetDir ((GetDir _factory + 270) % 360)

[_vehicle,_side] Call InitUnit

;Conform to terrain.

_vehicle SetVelocity [0,0,-0.1]

Using the special properties "FLY" works a treat for helicopters but the start altitude is too low for planes and results inevitably in a ball of flames. While making changes to the "_vehicle SetVelocity [0,0,-0.1]" so it reads "[0,0,200]" works well for aircraft, it doesn't impress the crews of every ai ground vehicle that gets launched 200mtrs into the air.

Is there any way to alter the default parameters of "FLY" to a higher altitude? Or possibly create a game logic that ensures that all ai aircraft spawn at a predetermined height?

Any help greatly appreciated.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×