Jump to content
Sign in to follow this  
SG_Smokintodd

Lap Counter, etc. for Racing Mission?

Recommended Posts

Does anybody how I can get started incorporating a lap counter and then keeping track of laps to a predesignated conclusion within the racing mission I'm working on? Can't seem to find anything for reference.

Thanks for any help offered.

Share this post


Link to post
Share on other sites

Id quite like a timer for my mission i'm making, dont see how you can get triggers to display a timer or save a time. Understand using them as a countdown or timer to something but not as a visual stopwatch with save function. Have searched for this quickly yesterday and didn't turn up anything quite like what OP is asking for.

Edited by Anthonyfromtheuk
Cannot spell

Share this post


Link to post
Share on other sites

Your first trigger (when you start driving) could set a variable "starttime" to the current missiontime.

http://community.bistudio.com/wiki/time

With that you can easily show/calculate your lap-time.

If you want it constantly displayed you could put something like this in the condition of a trigger (easiest way to have a loop):

hint format["Time: %1",time - starttime]"

You'll have to make it a bit more complex than that if you want it to be actually usable but the basics are rather simple. (though I would personally rather do it with a scriptfile instead of messing around with countless triggers)

Share this post


Link to post
Share on other sites

SG_Smokintodd you wanted a lapcounter. I think what I got off this helpful forum today would be of use to you. check out this Count and display how many times triggered

Everytime you go through the trigger it will be counted. you can just put the second triggers activation on your players init and it will display how many times you have been through the trigger constantly.

While looking for a timer which is what I thought you asked for to start with I found this Timed checkpoints and saving variables

I have played the rally game that was made from this downloaded from steam workshop and been playing with the code and a few triggers myself for the last half an hour. only problem being i don't see how you can display two hints at once so you would have to blend the two to get a timer and a lap counter and that i don't yet know how to do.

Hope that helps. :thumbsup:

Share this post


Link to post
Share on other sites

I'm just not getting it I guess but I'm a n00b ;)

Here's exactly what I want to do, in order;

.All vehicles disabled at start with a count down timer on screen

.When count down reaches zero, vehicles are enabled (engine starts)

.Count laps for each vehicle (player) and display on screen

.When pre-set laps reached, ie. 5, race ends with notification on screen. Bonus if it displays '2nd' and '3rd' place

Share this post


Link to post
Share on other sites

Here you go here is another example lap counter its a bit buggy though some times it works and sometimes it doesnt, kinda strange, was trying to add cheat detection a trigger to check you have gone all the way round but that just made it more buggy. at least you get what you asked for originally, a lap counter. must of been around that track 20 times. check it out let me know if it works. It only counts your laps none of the other stuff you asked for. your basically asking someone to make you the mission :p

Just tried it again and it didnt work first time round did second time then i tried reversing and it worked but not the next time don't know why its so buggy, maybe im too fast for the trigger to recognize me. and this wont work for MP i dont think

Edited by Anthonyfromtheuk
Its Sooo buggy!

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
Sign in to follow this  

×