Race "lap" help Created 16 years ago2008-06-09 16:34:49 UTC by whirly1227 whirly1227

Created 16 years ago2008-06-09 16:34:49 UTC by whirly1227 whirly1227

Posted 16 years ago2008-06-09 16:34:49 UTC Post #251077
If someone could help me figure out a way to creat a lap sequence. I am creating a race track and have everything done. I just need laps in order to win the race! I think I could use a tigger_once but not sure exactly what to do. Please someone help! =D
Posted 16 years ago2008-06-09 16:52:33 UTC Post #251079
Please explain a little more what you're trying to do in a little more detail so we could help you better. (interesting idea btw)

)

Captain Terror Captain Terrorwhen a man loves a woman
Posted 16 years ago2008-06-09 17:09:16 UTC Post #251080
Yeh, I have the perfect way.. hehe -- I used it for the scoring in the (highly unfinished) pong map I sent in for the competition. You'll need a trigger_multiple and a few math_counters.

Create the trigger_multiple across the starting/finishing point.

Then, you'll need to create a math_counter. In the properties give it a name and set it's maximum legal value to 3. (When I say set it for three, that's assuming you need 3 laps; Set this number at how many laps you'll need)

In the output tab of your counter, add the entry:

My output : OnHitMax
Target entities named : The name of your math_counter
Via this input : Subtract
With a parameter override : 3

Also.. add another "OnHitMax" output for what you want to happen when someone clears 3 laps.

Now, back at the trigger_multiple. In the output tab, add:

My output : OnTrigger
Target entities named : The name of your math_counter
Via this input : Add
With a parameter override : 1

So.. The trigger multiple adds "1" every time someone crosses it to the count of the math_counter. Once trigger_multiple adds up a count of 3 to your counter, the counter will "subtract" 3 (Resetting the counter) and then it will do whatever output you added for when a player completes the third lap.

IF, you need something more complex such as a visible counter for each lap completed, you'll need to follow the same steps. But, it will involve a math_counter for each lap that you have, and all of their outputs will need to be set up to activate and deactivate whatever you intend to act as a counter for the players to see. Once you reach "3", you'll have to set up the last counter to reset all of your counters.

Just make sure people dont run back through your trigger multiple.

If you can get use out of that, then yay ^_^

If you need an example map, ill be happy to set it up.
TheGrimReafer TheGrimReaferADMININATOR
Posted 16 years ago2008-06-09 17:33:30 UTC Post #251082
make the trigger_multiple disable itself after you trigger it, and then have another which enables it again half-way round the circuit to prevent people simply going repeatedly over the start/finish line
Archie ArchieGoodbye Moonmen
Posted 16 years ago2008-06-10 14:18:26 UTC Post #251083
That wouldn't work-

The nature of a "race" is to have someone else racing it with you.

If you make it work like that, then someone could finish a lap while another person that's already in the second half of the race makes it to the finish shortly after. The second guy would get to the finish before the first made it to the half-way reactivation mark, and the lap system would then be messed up :x

Your setup would work just fine with one person.

A mistake on my part Whirly -- In the output tab on the trigger_multiple, change "OnTrigger" to "OnStartTouch" or it wont work correctly.

And, looking back, might I suggest a trigger_push to keep racers from going back through the trigger_multiple
TheGrimReafer TheGrimReaferADMININATOR
Posted 16 years ago2008-06-10 14:36:46 UTC Post #251100
Hunter's method would work fine if you locked players into their own lane with clip brushes.
Captain Terror Captain Terrorwhen a man loves a woman
Posted 16 years ago2008-06-10 14:47:27 UTC Post #251101
From a gameplay perspective, clipping the lanes would suck :/
TheGrimReafer TheGrimReaferADMININATOR
Posted 16 years ago2008-06-10 17:17:33 UTC Post #251103
I'd use a math_counter together with a trigger_multiple, one setup for each car, or whatever it is that you are racing with. Use filters based on names to make sure that one car doesn't trigger all triggers, but just it's own.

The main trigger on the finishline should be setup to disable itself, and then there should be two other triggers, one halfway through the track, and one halfway to the halfway mark.

The trigger on halfway triggers the finishline to enable itself again, remember that you can use the same name for all the finishline triggers, so it won't be that confusing..
The trigger halfway to halfway should be yet another trigger that disables the finishline, preventing possible exploits for people driving backwards

blah blah I'm sure you get it..

That would be the easiest solution.
Group the setups for each car, that'll make it easier to edit them.
There is no way you can use the same trigger for all players.
Madcow MadcowSpy zappin my udder
You must be logged in to post a response.