Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
Wastelander

AI Vehicles/Aircraft Fuel/Ammo Full Untill Killed

Recommended Posts

In your Vehicle/Aircraft init you could have

[] exec "resupply.sqs";

Create a new .sqs file and inside there put

#top

"Vehicle" setFuel 1
"Vehicle" setVehicleAmmo 1

~30

goto "top"

Assuming the Aircraft or Vehicle you wish to constantly re-arm is called "Vehicle" in it's Name field. I think once it dies it stops running the file. This is very basic, someone will probably be able to help you out with something more robust.

Share this post


Link to post
Share on other sites

Write this in the init line of your vehicle:

nul = [this] execVM "resupply.sqf"

resupply.sqf:

_veh = _this select 0;

While {alive _veh} do {
   _veh setFuel 1;
   _veh setVehicleAmmo 1;
   sleep 30;
};

Share this post


Link to post
Share on other sites

nul = this spawn { while {alive _this} do { _this setFuel 1; _this setVehicleAmmo 1; sleep 30; } };

Just place this in the units initialization section.

Share this post


Link to post
Share on other sites
nul = this spawn { while {alive _this} do { _this setFuel 1; _this setVehicleAmmo 1; sleep 30; } };

Just place this in the units initialization section.

nice one this sounds easier :)

can this also be used on spawned vehicles?

Share this post


Link to post
Share on other sites
Sign in to follow this  

×