Jump to content

Fuel Script Help


SoniaStrummFan
 Share

You are about to reply to a thread that has been inactive for 2458 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I was wondering if anyone could help me make a fuel consumption script I could use for vehicles? I get how to modify a vehicle, but I can't write a script. I simply lack enough understanding of scripts to understand how to write my own custom one. So, I was hoping I could get some help from anyone out there who can write a script.

Link to comment
Share on other sites

You could develop almost any algorithm for fuel consumption that you like.  Perhaps the easiest is to just assume that fuel is consumed at a constant rate, and then count how long the vehicle has been running.  All you have to is use llResetTime when you start the engine and llGetTime whenever you want to know how long it has been running.  Multiply that by your phony fuel consumption rate constant and you're done.

Link to comment
Share on other sites

It depends on what type of fuel you are using firstly. You need to figure out it's energy production per unit after you determine the type of fuel. Then you need to figure out your engine efficiency at certain stages, or come up with a formula based on velocity. Then you should have an adjustment value based on the mass of the vehicle + passengers. Don't forget you also consume fuel while idling, so you may want to include that as well.

Link to comment
Share on other sites

  • 5 years later...
You are about to reply to a thread that has been inactive for 2458 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...