Jump to content

Recommended Posts

Posted

Hi all!

 

I am trying to make a racing mission, I can get results to show, but they are only to the tenths of a second.

 

Does anyone know to what decimal point the timer.getTime() function in game should be?

 

I would like to get results to within 100/ths of a second if possible.

 

BTW I am a complete novice to .lua programming.

 

Thanks!

 

PB4Tazman

Posted

Thanks for the reply Shahdoh!

 

Is that .01 implemented using .lua script or do you use triggers somehow?

 

I am stuck on how to get the hundredths to calculate.

 

Cheers!

 

PB4Tazman

Posted

Ok, so lua it is.

 

So I am thinking I have to add .01 to the timer.getTime() every .01 second?

 

Is there a function that can do that? I do not know lua much at all, and any point in the right direction

would be of great help. I have looked at the SSE see wiki, but as of now its over my head .

 

Thanks!

Posted

You have to run a function every .01 second or faster for more precise results.

 

function checkGate()
timer.scheduleFunction(checkGate, {}, timer.getTime() + .01)

-- put all of your code that checks if a unit is inside a gate area and record the players time here.
end

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...