Race placing via variables?

I intend to use variables for keeping track of placing (1st, 2nd, etc.) in a race. When a racer crosses the start/finish line, he will get one point. He needs three points to get a placing. But I'm having trouble with the score system. How do I make it so the racers' scores get checked during the race so that: the racer who finishes all the laps first gets first place, the racer who finishes second gets second place, etc.?

@Burgerland 'Games in Development' is not the place to ask how to do things. Please edit out your two questions and make two new threads in MV Support, one for each question.
We would need to know how you are controlling the race. What is a 'racer' - an event? How are you moving them? How are you varying their movement?

I suspect you would just need a variable for each racer, to count how many laps they have done, and a variable to count how many racers have finished all the laps. And maybe 3 variables to contain the id of the first, second and third place getters. Whatever your process for monitoring when one finishes a lap, increment the variable for that racer, then if it's equal to the number of laps required, increment the variable that counts how many racers have finished all the laps. Then set one of the 3 variables to the racer's id, based on whether they are first, second or third.

It's probably going to be a bit complicated, so we might have to show you. But we need to know what you've already got set up first, and how it's currently working.
Kes mentions to post this in MV Support, so why did you post it in Plugin Support?

I've moved this thread to MV Support. Thank you.

We would need to know how you are controlling the race. What is a 'racer' - an event? How are you moving them? How are you varying their movement?

I suspect you would just need a variable for each racer, to count how many laps they have done, and a variable to count how many racers have finished all the laps. And maybe 3 variables to contain the id of the first, second and third place getters. Whatever your process for monitoring when one finishes a lap, increment the variable for that racer, then if it's equal to the number of laps required, increment the variable that counts how many racers have finished all the laps. Then set one of the 3 variables to the racer's id, based on whether they are first, second or third.

It's probably going to be a bit complicated, so we might have to show you. But we need to know what you've already got set up first, and how it's currently working.

The race is run by an event (autorun) that controls the three racers. A racer is an event. They're moving via another event (parallel process) that ensures they run on the track properly. When they touch a region, they turn in the right direction on the track.

So if I'm understanding you right, the variables would be like this:
- racer 1 laps
- racer 2 laps
- racer 3 laps
- number of racers who finished all laps
- first place
- second place
- third place

Then, when a racer (let's say racer 1) finishes a lap:
- add 1 to "racer 1 laps"
- if "racer 1 laps" = 3 laps, than add 1 to "number of racers who finished all laps"
- racer 1 gets a place

Kes mentions to post this in MV Support, so why did you post it in Plugin Support?
Moved to: MV Support

I couldn't find MV Support, I'm sorry. But thank you for your patience.
Yes, exactly as you say.
Thank you!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/race-placing-via-variables.115311/