Check the position into a race
- PrinceOfFunky
- Godlike
- Posts: 1200
- Joined: Mon Aug 31, 2015 10:31 pm
Check the position into a race
Few days ago I started the Race gametype and I put all essential stuff, except with events like when someone dies and when position changes.
I was wondering, do you know a way to set positions in a Race game?
I was wondering, do you know a way to set positions in a Race game?
"Your stuff is known to be buggy and unfinished/not properly tested"
-
- Godlike
- Posts: 3774
- Joined: Fri Jan 14, 2011 1:53 pm
- Personal rank: -Retired-
Re: Check the position into a race
SetPostion.
Elaborate more, I don't think that answers you really.
Elaborate more, I don't think that answers you really.
So long, and thanks for all the fish
- PrinceOfFunky
- Godlike
- Posts: 1200
- Joined: Mon Aug 31, 2015 10:31 pm
Re: Check the position into a race
XD, that's the name of a function maybe but, I wanted to know if you knew how to check which position is the player in :/JackGriffin wrote:SetPostion.
Elaborate more, I don't think that answers you really.
"Your stuff is known to be buggy and unfinished/not properly tested"
-
- Godlike
- Posts: 3774
- Joined: Fri Jan 14, 2011 1:53 pm
- Personal rank: -Retired-
Re: Check the position into a race
Do you mean position as in first, second, etc or absolute position as in X,Y,Z?
So long, and thanks for all the fish
- EvilGrins
- Godlike
- Posts: 9774
- Joined: Thu Jun 30, 2011 8:12 pm
- Personal rank: God of Fudge
- Location: Palo Alto, CA
- Contact:
Re: Check the position into a race
If you die you should have to go all the way back to the starting line... especially as if the race involves a vehicle pickup then the racers probably can only get that WAY BACK there.
http://unreal-games.livejournal.com/
Smilies · viewtopic.php?f=8&t=13758medor wrote:Replace Skaarj with EvilGrins
- PrinceOfFunky
- Godlike
- Posts: 1200
- Joined: Mon Aug 31, 2015 10:31 pm
Re: Check the position into a race
No lol, any actor has the "Location" variable.JackGriffin wrote:Do you mean position as in first, second, etc or absolute position as in X,Y,Z?
I meant, the position like first, second, etc...
Already did it on the worst case, on the lucky case it will be respawned to the last checkpoint, that are set every 3 or whatever seconds.EvilGrins wrote:If you die you should have to go all the way back to the starting line... especially as if the race involves a vehicle pickup then the racers probably can only get that WAY BACK there.
But anyway, this doesn't answer my question .o.
"Your stuff is known to be buggy and unfinished/not properly tested"
-
- Godlike
- Posts: 3774
- Joined: Fri Jan 14, 2011 1:53 pm
- Personal rank: -Retired-
Re: Check the position into a race
It's hard to do since you'll need to account for maps and such. I see two ways to do it, one easy but not good and one hard but very good.
1- Just use the lap times. First is obviously the first person to lap. They retain that position until the next lap and the positions are re-ordered.
2- Subdivide the track into sections (A, B, C, D for example) and add checkpoints. Use those to compute position.
1- Just use the lap times. First is obviously the first person to lap. They retain that position until the next lap and the positions are re-ordered.
2- Subdivide the track into sections (A, B, C, D for example) and add checkpoints. Use those to compute position.
So long, and thanks for all the fish
- PrinceOfFunky
- Godlike
- Posts: 1200
- Joined: Mon Aug 31, 2015 10:31 pm
Re: Check the position into a race
Already tought about both options, but no any of them can be working.JackGriffin wrote:It's hard to do since you'll need to account for maps and such. I see two ways to do it, one easy but not good and one hard but very good.
1- Just use the lap times. First is obviously the first person to lap. They retain that position until the next lap and the positions are re-ordered.
2- Subdivide the track into sections (A, B, C, D for example) and add checkpoints. Use those to compute position.
1- What happens if someone gets over someone else after they both lapped?
2- What happens if more than one players are between 2 sections?
:/ I think I will avoid to use positions.
"Your stuff is known to be buggy and unfinished/not properly tested"
-
- Godlike
- Posts: 3774
- Joined: Fri Jan 14, 2011 1:53 pm
- Personal rank: -Retired-
Re: Check the position into a race
You can't really avoid the scenarios. In a larger sense if you have a race between any two things the only way to determine who is the winner is either make them both relative to a place (a finish line for instance) or relative to each other (who gets to point 'A' first). If you have a race with laps then you will need to treat the circuit as a whole and count laps relative to an external clock timer or further divide the circuit into smaller segments but still make them relative to that external clock.
So long, and thanks for all the fish
- PrinceOfFunky
- Godlike
- Posts: 1200
- Joined: Mon Aug 31, 2015 10:31 pm
Re: Check the position into a race
Can't do it, because I want the race system to work with zones, and mappers cannot make too many zones just to let racers know their position :/JackGriffin wrote:You can't really avoid the scenarios. In a larger sense if you have a race between any two things the only way to determine who is the winner is either make them both relative to a place (a finish line for instance) or relative to each other (who gets to point 'A' first). If you have a race with laps then you will need to treat the circuit as a whole and count laps relative to an external clock timer or further divide the circuit into smaller segments but still make them relative to that external clock.
"Your stuff is known to be buggy and unfinished/not properly tested"
-
- Godlike
- Posts: 3774
- Joined: Fri Jan 14, 2011 1:53 pm
- Personal rank: -Retired-
Re: Check the position into a race
How will you track a winner then? Just curious.
So long, and thanks for all the fish
- PrinceOfFunky
- Godlike
- Posts: 1200
- Joined: Mon Aug 31, 2015 10:31 pm
Re: Check the position into a race
The Lap is a Zone and any zone calls "ZoneChanged()" function on actors and the computer is procedural, so only one racer can lap at time. The first one that will lap "maxLaps" times, will win.JackGriffin wrote:How will you track a winner then? Just curious.
"Your stuff is known to be buggy and unfinished/not properly tested"
Re: Check the position into a race
Again, knowing nothing about the subject could bot paths be utilised somehow? Do they have "waypoints" along the course of the path that you could use as checkpoints or proximity markers?
- papercoffee
- Godlike
- Posts: 10453
- Joined: Wed Jul 15, 2009 11:36 am
- Personal rank: coffee addicted !!!
- Location: Cologne, the city with the big cathedral.
- Contact:
Re: Check the position into a race
You explained somewhere that this single zone is necessary to check if one racer is leaving the track ...but what about to reverse this mechanic? make the outside of the track a zone witch detect if some racer is entering it. That way could you use the inside of the track for the checkpoint zones.PrinceOfFunky wrote:The Lap is a Zone and any zone calls "ZoneChanged()" function on actors and the computer is procedural, so only one racer can lap at time. The first one that will lap "maxLaps" times, will win.JackGriffin wrote:How will you track a winner then? Just curious.
- PrinceOfFunky
- Godlike
- Posts: 1200
- Joined: Mon Aug 31, 2015 10:31 pm
Re: Check the position into a race
ShaiHulud wrote:Again, knowing nothing about the subject could bot paths be utilised somehow? Do they have "waypoints" along the course of the path that you could use as checkpoints or proximity markers?
Men, I'll just write down a post with the beta.papercoffee wrote:You explained somewhere that this single zone is necessary to check if one racer is leaving the track ...but what about to reverse this mechanic? make the outside of the track a zone witch detect if some racer is entering it. That way could you use the inside of the track for the checkpoint zones.PrinceOfFunky wrote:The Lap is a Zone and any zone calls "ZoneChanged()" function on actors and the computer is procedural, so only one racer can lap at time. The first one that will lap "maxLaps" times, will win.JackGriffin wrote:How will you track a winner then? Just curious.
"Your stuff is known to be buggy and unfinished/not properly tested"