Jump to content
SoniaStrummFan

Fuel Script Help

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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...