Selecting a team for campaign mode
Moderator: Moderators
- authraw
- 1st Lieutenant

- Posts: 445
- Joined: Mon Jun 26, 2006 3:45 pm
Selecting a team for campaign mode
How does one set which team is played by the player in a campaign mode? No matter what I do, my campaign mode always seems to select team 1 as the playable team (when I want team 2 to be playable.) Is it just hard-coded in that team 1 is playable and team 2 is not?
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Selecting a team for campaign mode
I'm pretty sure that running the scripted game rules for campaign sets it up so that the player must be on team 1. I'm not sure why it should be a huge issue, since you can just reverse the teams' makeups. But there are even some non-explicitly-campaign callbacks that seem to indicate that team 1 is the only default player team (ForceHumansOntoTeam1 - there's no callback for forcing them onto team 2).
-
Ace_Azzameen_5
- Jedi

- Posts: 1119
- Joined: Sat Apr 23, 2005 8:52 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: Selecting a team for campaign mode
Just switch the teams' numbers.
I.E. REP = 2 CIS = 1 . That should do it. Also, if you have custom code refering to the team numbers (and not the team number variables, REP, CIS, ALL, IMP etc) then you need to change that.
I.E. REP = 2 CIS = 1 . That should do it. Also, if you have custom code refering to the team numbers (and not the team number variables, REP, CIS, ALL, IMP etc) then you need to change that.
-
Abiter_b
Re: Selecting a team for campaign mode
Dunno if this helps but if u get rid of this line you arn't forced onto a team and can choose like in a normal gamemode. I don't think killing this line has any major side effects.
Code: Select all
ScriptCB_SetGameRules("campaign")- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Selecting a team for campaign mode
No major side effects except... you aren't forced onto one team, which is kinda crucial to a campaign.Abiter_b wrote:Dunno if this helps but if u get rid of this line you arn't forced onto a team and can choose like in a normal gamemode. I don't think killing this line has any major side effects.
Code: Select all
ScriptCB_SetGameRules("campaign")
- authraw
- 1st Lieutenant

- Posts: 445
- Joined: Mon Jun 26, 2006 3:45 pm
Re: Selecting a team for campaign mode
Alright--if reversing the numbers is the only way to do it, then so be it. Generally it wouldn't be an issue, but I've already written a LOT of code, and reversing the team numbers throughout will be a pain (because I, being the intelligent coder I am, decided to forgo the REP, CIS, DEF, and ATT variables and just used team numbers.) >_<
Very well. Thanks all!
Very well. Thanks all!
-
Ace_Azzameen_5
- Jedi

- Posts: 1119
- Joined: Sat Apr 23, 2005 8:52 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: Selecting a team for campaign mode
My code's the same. Now I know why they have those as variables...
