Page 1 of 1
Selecting a team for campaign mode
Posted: Sat Dec 01, 2007 1:56 am
by authraw
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?
Re: Selecting a team for campaign mode
Posted: Sat Dec 01, 2007 2:01 am
by Maveritchell
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).
Re: Selecting a team for campaign mode
Posted: Sat Dec 01, 2007 9:44 am
by Ace_Azzameen_5
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.
Re: Selecting a team for campaign mode
Posted: Sat Dec 01, 2007 11:09 am
by Abiter_b
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.
Re: Selecting a team for campaign mode
Posted: Sat Dec 01, 2007 11:14 am
by Maveritchell
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.
No major side effects except... you aren't forced onto one team, which is kinda crucial to a campaign.
Re: Selecting a team for campaign mode
Posted: Sat Dec 01, 2007 1:44 pm
by authraw
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!
Re: Selecting a team for campaign mode
Posted: Sat Dec 01, 2007 3:44 pm
by Ace_Azzameen_5
My code's the same. Now I know why they have those as variables...