Only 1 playable side

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Only 1 playable side

Post 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.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Only 1 playable side

Post by Maveritchell »

ScriptCB_SetGameRules("campaign")
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Re: Only 1 playable side

Post by Aman/Pinguin »

And how do I define the team in which the player comes? Or is it always team 1?
Last edited by Aman/Pinguin on Fri Feb 08, 2008 2:00 pm, edited 1 time in total.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Only 1 playable side

Post by Maveritchell »

When the game rules are set to campaign, only team 1 is playable.
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Re: Only 1 playable side

Post by Aman/Pinguin »

Good thanks.
MandeRek
Sith Master
Sith Master
Posts: 2766
Joined: Tue Oct 02, 2007 10:51 am
Projects :: Battlefront Zer0
Games I'm Playing :: SWTOR
xbox live or psn: No gamertag set
Location: Ghosting around GT
Contact:

Re: Only 1 playable side

Post 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? :?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Only 1 playable side

Post 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.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Only 1 playable side

Post 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.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Only 1 playable side

Post by Maveritchell »

He did ask "just like in the campaigns." :P

The campaign setup has the positive effect of going right to the unit selection screen, rather than just disallowing choosing the team 2.
Post Reply