"stealing" vehicles from ai

fgw

New Member
sarge:
in an reply to an old post http://opendayz.net/threads/sarge-ai-framework-public-release.8391/page-51#post-36788 you answered to the question if ai helis could be used:

nope. if you shoot them down, and they dont explode, they will vanish when you get close to them. This is intended, otherwise the balance of helis is changed too much, especially if they are set to respawn.

is this true for all other vehicles also? i tried to "steal" vehicles from ai and everytime i treid they despawn within seconds and my character is dropped out again. is this expected behavior?

i personally would like to steal vehicles from ai and use them afterwards even if they disappear at server restart. this might be a different story for helis as this might bring too many helis into the game, but i dont see an issue with other vehicles? can this be changed anyhow? can this be changed even so to stay persistent during server restart?
 
It is doable. If you really want this, add an exception in the server_updateObject.sqf.

look for

Code:
if (!_parachuteWest) then {

and change to

Code:
if (!_parachuteWest && (_object getVariable ["Sarge",0] != 1)) then {

if you want that for land vehicles only, you will need to add a condition for that as well, like:

Code:
"LandVehicle" countType [vehicle _object]>0

So the full monty should look like:

Code:
if (!_parachuteWest && (_object getVariable ["Sarge",0] != 1) && ("LandVehicle" countType [vehicle _object]==0)) then {

Untested, but should work.

cheers, Sarge
 
ok, i tried this, and it worked for land vehicles, but not for helis, and i didn't add the condition for the land vehicles.

also, if ai gets into our helis, the heli vanishes if we kill the ai, but if we dont kill them, it just flies away?

any help with this would be much appreciated.
 
Back
Top