Page 1 of 1
Race Mode Scoring Possible?
Posted: Sat Sep 23, 2006 3:53 pm
by Big_rich
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.
Re: Race Mode Scoring Possible?
Posted: Sat Sep 23, 2006 3:57 pm
by Maveritchell
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.
I'm unfamiliar with Race Mode; I've not tried scripting any of the new modes.
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)
RE: Re: Race Mode Scoring Possible?
Posted: Sat Sep 23, 2006 5:28 pm
by [RDH]Zerted
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.
RE: Re: Race Mode Scoring Possible?
Posted: Sat Sep 23, 2006 5:32 pm
by t551
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.
Re: RE: Re: Race Mode Scoring Possible?
Posted: Sat Sep 23, 2006 5:32 pm
by Maveritchell
[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.
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.
RE: Re: RE: Re: Race Mode Scoring Possible?
Posted: Sat Sep 23, 2006 7:06 pm
by Dohnutt
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?
Re: RE: Re: RE: Re: Race Mode Scoring Possible?
Posted: Sat Sep 23, 2006 8:02 pm
by Xavious
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?
That is a simple matter of
planning....
RE: Re: RE: Re: RE: Re: Race Mode Scoring Possible?
Posted: Sat Sep 23, 2006 8:52 pm
by Darth_Z13
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.
Posted: Sun Sep 24, 2006 5:02 am
by 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....
Re: RE: Re: RE: Re: RE: Re: Race Mode Scoring Possible?
Posted: Sun Sep 24, 2006 7:45 am
by Dohnutt
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.
Yeah, and what if you missed that flag?
I think that something like "checkpoints" would be cool. Maybe 2 or 3 of them around the track.

No?
Posted: Sun Sep 24, 2006 4:21 pm
by [RDH]Zerted
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
RE: Re: RE: Re: RE: Re: RE: Re: Race Mode Scoring Possible?
Posted: Sun Sep 24, 2006 4:27 pm
by Teancum
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.
RE: Re: RE: Re: RE: Re: RE: Re: Race Mode Scoring Possible?
Posted: Sun Sep 24, 2006 4:34 pm
by Dohnutt
So, spectators would just watch? Or would they fire at the racers?
RE: Re: RE: Re: RE: Re: RE: Re: Race Mode Scoring Possible?
Posted: Sun Sep 24, 2006 4:40 pm
by Teancum
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.
Re: RE: Re: RE: Re: RE: Re: RE: Re: Race Mode Scoring Possib
Posted: Sun Sep 24, 2006 4:42 pm
by Dohnutt
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.
Hah! That'd be sick!

I'd play that so much!
Posted: Sun Sep 24, 2006 11:29 pm
by 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.
Posted: Sun Sep 24, 2006 11:40 pm
by [RDH]Zerted
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.