Page 1 of 1
Only 1 playable side
Posted: Fri Feb 08, 2008 1:52 pm
by Aman/Pinguin
Easy question with a hopefuly easy answer:
How do i force a player automaticaly to a team when the map begins? Just like in the campaigns.
Re: Only 1 playable side
Posted: Fri Feb 08, 2008 1:55 pm
by Maveritchell
ScriptCB_SetGameRules("campaign")
Re: Only 1 playable side
Posted: Fri Feb 08, 2008 1:57 pm
by Aman/Pinguin
And how do I define the team in which the player comes? Or is it always team 1?
Re: Only 1 playable side
Posted: Fri Feb 08, 2008 1:58 pm
by Maveritchell
When the game rules are set to campaign, only team 1 is playable.
Re: Only 1 playable side
Posted: Fri Feb 08, 2008 2:00 pm
by Aman/Pinguin
Good thanks.
Re: Only 1 playable side
Posted: Fri Feb 08, 2008 2:33 pm
by MandeRek
Sorry, i thought posting it here since this is kindoff the same...
How do you make
one playable unit/class, but other classes/AI from that team still play (they're not playable) Is this possible in another way then locals?
Also, how do you 'unlock' a certain character after a mission is accomplished? (example; campaign training
now switch to the engineer class...
while it wasn't playable before accomplishing)
Again, i thought best would be to post this here, since these both are for some sort of campaign goals right?

Re: Only 1 playable side
Posted: Fri Feb 08, 2008 3:02 pm
by Maveritchell
It's fine to start a new topic for a new question, if you need to.
Regardless, to answer your question, you need to do the first through a local team. You could make it so that if the player spawned as another character on your team you forced him to spawn as the class you want, but it's much easier to just use a local team.
The second is easy, all you do is use AddUnitClass whenever the objective is finished.
Re: Only 1 playable side
Posted: Fri Feb 08, 2008 5:06 pm
by [RDH]Zerted
Maveritchell wrote:ScriptCB_SetGameRules("campaign")
Unless you want all the other effects of the campaign rules, you should really just use
ForceHumansOntoTeam1(1).
Yeah, you should have the AI on a locals team. Check the assets/scripts/geo/geo1c_c.lua to see how the training mission has things setup.
Re: Only 1 playable side
Posted: Fri Feb 08, 2008 7:03 pm
by Maveritchell
He did ask "just like in the campaigns."
The campaign setup has the positive effect of going right to the unit selection screen, rather than just disallowing choosing the team 2.