Jump to content
Blitzen88

How to regenerate a vehicle’s fuel, health, and ammo?

Recommended Posts

Greetings

 

I play long solo missions and often times find myself spending a lot of time moving up logistics trucks to injured/depleted vehicles. Although this adds a degree of realism its too time consuming.

 

Is there a way to make vehicles regenerate their ammo, fuel, and health? I believe a “while fuel < 1” styled loop script would work but I dont have the knowledge to pull it off

 

Also, how could the script be manipulated so that it ends when the vehicle is destroyed?

 

Thank you for your time

Share this post


Link to post
Share on other sites

These codes act instantly:

  • Fuel: vehicleName setFuel 1; // 0 = 0% fuel, 0.5 = 50% fuel, 1 = 100% fuel.

  • Ammo: vehicleName setVehicleAmmo 1; // 0 = empty, 1= full.

  • Health: vehicleName setDamage 0; // 0 = 100% health, 0.5 = 50% health, 1 = 100% health.

I hope this is what you are looking for.

Share this post


Link to post
Share on other sites
14 hours ago, Blitzen88 said:

Greetings

 

I play long solo missions and often times find myself spending a lot of time moving up logistics trucks to injured/depleted vehicles. Although this adds a degree of realism its too time consuming.

 

Is there a way to make vehicles regenerate their ammo, fuel, and health? I believe a “while fuel < 1” styled loop script would work but I dont have the knowledge to pull it off

 

Also, how could the script be manipulated so that it ends when the vehicle is destroyed?

 

Thank you for your time

Do you have the support waypoint working for logistical use? Its totally broken for me.

 

Anyway ,why not add event handlers to the vehicles as well to handle their damage.I do this for friendly AI vehicles to increase their "staying time" and because as said,support waypoint is totally not working for me.

Share this post


Link to post
Share on other sites

Do you have the support waypoint working for logistical use? Its totally broken for me.

 

Anyway ,why not add event handlers to the vehicles as well to handle their damage,and half taken damage.I do this for friendly AI vehicles to increase their "staying time" and because as said,support waypoint is totally not working for me.

Share this post


Link to post
Share on other sites
10 hours ago, redarmy said:

Do you have the support waypoint working for logistical use? Its totally broken for me.

 

Anyway ,why not add event handlers to the vehicles as well to handle their damage,and half taken damage.I do this for friendly AI vehicles to increase their "staying time" and because as said,support waypoint is totally not working for me.

I play 98% of my missions with the Advanced AI Command module. I assign waypoints to support/logistics unit to bring them to damages units; I do not use the support waypoint. 

 

With the help of another forum member I was able to add an action that would refuel, rearm, and repair vehicles. 

Share this post


Link to post
Share on other sites
27 minutes ago, Blitzen88 said:

I play 98% of my missions with the Advanced AI Command module. I assign waypoints to support/logistics unit to bring them to damages units; I do not use the support waypoint. 

 

With the help of another forum member I was able to add an action that would refuel, rearm, and repair vehicles. 

Hey thats awesome man. care to share?

 

Im also using Advanced AI command mod,and never thought about doing something like this.

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

×