Race Mode Scoring Possible?
Moderator: Moderators
-
Big_rich
Race Mode Scoring Possible?
My idea is to create a region after the start of a Race. Once a player enters the region( after a lap), it will log a point for that player, much like TDM you get a point for a kill. Once a certain number of points are reached, say 10 laps the game will end and display the amount of points each player got. Obviously the one with the most points wins. Problem is I have no, I mean absoulty no, idea on how to script this in. Anyone with more scripting experance than myself have any ideas? I can create a region and such, but the lua for adding points and ending games is a mystery. I have looked through all the TDM objectives and such, Can't seem to make heads or tails of how it's scoring.
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Race Mode Scoring Possible?
I'm unfamiliar with Race Mode; I've not tried scripting any of the new modes.Big_rich wrote:My idea is to create a region after the start of a Race. Once a player enters the region( after a lap), it will log a point for that player, much like TDM you get a point for a kill. Once a certain number of points are reached, say 10 laps the game will end and display the amount of points each player got. Obviously the one with the most points wins. Problem is I have no, I mean absoulty no, idea on how to script this in. Anyone with more scripting experance than myself have any ideas? I can create a region and such, but the lua for adding points and ending games is a mystery. I have looked through all the TDM objectives and such, Can't seem to make heads or tails of how it's scoring.
However, would you be able to create a CTF map and have the flag spawn and the flag score region in the same place? That way, one could pick up the flag and instantly score. If that's possible, I know it's not quite what you wanted, but it would probably work. (Provided you localize the name of the mode to something else)
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
RE: Re: Race Mode Scoring Possible?
ugh. Are you planning on creating the Racing game mode?
One problem with your current idea: All the players have to do is step in/out of the region 10 times to win. They don't have to go anywhere, only to the region border.
One problem with your current idea: All the players have to do is step in/out of the region 10 times to win. They don't have to go anywhere, only to the region border.
-
t551
- General

- Posts: 791
- Joined: Sat Jul 16, 2005 3:23 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
RE: Re: Race Mode Scoring Possible?
You could have two (or more) regions, you have to activate the other region (in order, if there are more) to activate the scoring region.
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: RE: Re: Race Mode Scoring Possible?
That is only if the border is universally accessible. The best way to set up a race map so that the one path is the only path is to make the course involve jumps. So long as a ramp was provided over an otherwise-impassible crevasse, any speederbike/swoop could only go one way. In which case, someone could just put the region at the top of the jump.[RDH]Zerted wrote:ugh. Are you planning on creating the Racing game mode?
One problem with your current idea: All the players have to do is step in/out of the region 10 times to win. They don't have to go anywhere, only to the region border.
- Dohnutt
- Hoth Battle Chief

- Posts: 3248
- Joined: Sun Aug 20, 2006 9:25 am
- Contact:
RE: Re: RE: Re: Race Mode Scoring Possible?
Ah, that's a good idea. But, then wouldn't the AI (being the idiots they are) just try to run up the wall? Or would they actually go around the whole track?
-
Xavious
- Sith Master

- Posts: 2783
- Joined: Mon Jun 12, 2006 3:46 pm
Re: RE: Re: RE: Re: Race Mode Scoring Possible?
That is a simple matter of planning....Dohnutt wrote:Ah, that's a good idea. But, then wouldn't the AI (being the idiots they are) just try to run up the wall? Or would they actually go around the whole track?
-
Darth_Z13
- Jedi High Council

- Posts: 2275
- Joined: Sat Jun 17, 2006 9:51 am
- xbox live or psn: Xanthius Wylon
- Location: Canada
RE: Re: RE: Re: RE: Re: Race Mode Scoring Possible?
If you put it as a CTF mode you could just make them pick up the flags and carry it to the next score spot.
-
RC-1290
well than you just have CTF again, since that's about who has the flag first anyway. The Idea of a race mode is fun but I don't think you will get a real good result without adjusting some speeds, acceleration times and put in an option to slow people down by ramming them... In the current Battlefront, the speeds are almost fixed and I think it would just be a matter of who spawns first and has the lowest amount of lag....
- Dohnutt
- Hoth Battle Chief

- Posts: 3248
- Joined: Sun Aug 20, 2006 9:25 am
- Contact:
Re: RE: Re: RE: Re: RE: Re: Race Mode Scoring Possible?
Yeah, and what if you missed that flag?Darth_Z13 wrote:If you put it as a CTF mode you could just make them pick up the flags and carry it to the next score spot.
I think that something like "checkpoints" would be cool. Maybe 2 or 3 of them around the track.
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
I was thinking more along the lines of having the CPs be the checkpoints. You have to pass each CP in a given order to complete the race.
Should the race be team based (anyone on your team can touch a CP) or person based (each person has to go to each CP)? If its team based, there is the risk of team members spreading out to all CPs, in which case it turns out to which team can get to all CPs the fastest instead of who can race around the map first.
Should there be two racing teams and a 'gremlin' team? The two teams race and the gremlins try to stop the racers from completing the race in a certain amount of time. Or maybe just one racing team and the gremlin team.
If the mode requires anything to be added to the map in ZeroEdit for the mode to work, then the Race mode won't be on any of the retail SWBF2 maps. The mode can only use what is already in a level.
_________
Sorry Big_rich for sort of taking over your topic. Right now you can give points by doing that flag capture thing or hiding a CP in each region. The CP would have to have a very quick capture time so the first person who enters the region captures the CP and gets the points.
Ending the map is easy. Its MissionVictory( [team number] ) where [team number] is the number of the team that won.
Ex:
MissionVictory( teamATT ) --teamATT wins
MissionVictory(1) --team 1 wins
MissionVictory( {1, 2} ) --both teams 1 and 2 win
Should the race be team based (anyone on your team can touch a CP) or person based (each person has to go to each CP)? If its team based, there is the risk of team members spreading out to all CPs, in which case it turns out to which team can get to all CPs the fastest instead of who can race around the map first.
Should there be two racing teams and a 'gremlin' team? The two teams race and the gremlins try to stop the racers from completing the race in a certain amount of time. Or maybe just one racing team and the gremlin team.
If the mode requires anything to be added to the map in ZeroEdit for the mode to work, then the Race mode won't be on any of the retail SWBF2 maps. The mode can only use what is already in a level.
_________
Sorry Big_rich for sort of taking over your topic. Right now you can give points by doing that flag capture thing or hiding a CP in each region. The CP would have to have a very quick capture time so the first person who enters the region captures the CP and gets the points.
Ending the map is easy. Its MissionVictory( [team number] ) where [team number] is the number of the team that won.
Ex:
MissionVictory( teamATT ) --teamATT wins
MissionVictory(1) --team 1 wins
MissionVictory( {1, 2} ) --both teams 1 and 2 win
Last edited by [RDH]Zerted on Sun Sep 24, 2006 4:32 pm, edited 1 time in total.
- Teancum
- Jedi Admin

- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
RE: Re: RE: Re: RE: Re: RE: Re: Race Mode Scoring Possible?
Player-based. My concept was to have one team be racers and the opposite team be specators. The racers would only spawn in the racing grid, and spectators spawn in designated spectating areas.
I've got it 100% planned out in my head, but no time to make it a reality.
I've got it 100% planned out in my head, but no time to make it a reality.
- Dohnutt
- Hoth Battle Chief

- Posts: 3248
- Joined: Sun Aug 20, 2006 9:25 am
- Contact:
RE: Re: RE: Re: RE: Re: RE: Re: Race Mode Scoring Possible?
So, spectators would just watch? Or would they fire at the racers?
- Teancum
- Jedi Admin

- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
RE: Re: RE: Re: RE: Re: RE: Re: Race Mode Scoring Possible?
Sure, they could shoot if they wanted. The whole reason to make all the racers on the same team was to make sure that only the leader can 'capture' the checkpoint CP.
- Dohnutt
- Hoth Battle Chief

- Posts: 3248
- Joined: Sun Aug 20, 2006 9:25 am
- Contact:
Re: RE: Re: RE: Re: RE: Re: RE: Re: Race Mode Scoring Possib
Hah! That'd be sick!Teancum wrote:Sure, they could shoot if they wanted. The whole reason to make all the racers on the same team was to make sure that only the leader can 'capture' the checkpoint CP.
-
Big_rich
My question is does the game have the ability to see seperate players or only human player? My thoughts would be to use multiple regions to control the turning on and off of other regions, leading up to the scoring region. But that would only work if the game can sence seperate players. Basically turn off region 1(scoring region) on exit by a humanCharacter. At the same time turn on region 2(1/4 track) and kill region 1,3(1/2 track),4(3/4 track). then once you reach region 2 do the same, activate region 3 leaving the rest off. Now this will only work if the game can see and give points to seperate players
OnEnterRegion. Also this wouldn't work for a singleplayer game, only MP. Which I wouldn't imagine AI would be fun to play agnist anyway.
OnEnterRegion. Also this wouldn't work for a singleplayer game, only MP. Which I wouldn't imagine AI would be fun to play agnist anyway.
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Yes, players can be defined and tracked in many ways. GetTeamMember( [team number], [player number] ) will return a character pointer to the player on the given team with the given number.
IsCharacterHuman( [character] ) is in the scripting guide documentation. It will return true if the given character is a human player. (I don't remember it its IsChara... or isChara... )
There is also a GetTeamSize( [team number] ) which will return the amount of players on the given team. The player's number ( used in GetTeamMember() ) is a number from 0 to (but not including) the value GetTeamSize() returns.
IsCharacterHuman( [character] ) is in the scripting guide documentation. It will return true if the given character is a human player. (I don't remember it its IsChara... or isChara... )
There is also a GetTeamSize( [team number] ) which will return the amount of players on the given team. The player's number ( used in GetTeamMember() ) is a number from 0 to (but not including) the value GetTeamSize() returns.
