Hello there general kenobi
I've seen some maps with a campaign mode where you're able to choose both teams, how can I do it?
I mean is it possible to get different campaign scripts for team 1 and team 2, so when you spawn with team "A" the campaign script "A" plays?
Thanks for the help ! =)
Different campaign scripts for 2 sides
Moderator: Moderators
- CT108
- Rebel Sergeant
- Posts: 186
- Joined: Mon Aug 22, 2016 6:20 am
- Projects :: None
- xbox live or psn: Captain CT108
- Location: Xanadu
-
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: Different campaign scripts for 2 sides
ScriptCB_SetGameRules("campaign") is what causes team 1 to be the chosen team. You could then use GetCharacterTeam(0) to get the player's team number and execute conditional logic based on that. See here for more info on GetCharacterTeam: https://github.com/marth8880/SWBF2-Lua- ... clua#L1681
You will, however, want to take into account the fact that the player can still change teams in the spawn screen. I think Zerted once figured out a way to keep the player on their initially-chosen team after they've spawned, so you should look into that.
You will, however, want to take into account the fact that the player can still change teams in the spawn screen. I think Zerted once figured out a way to keep the player on their initially-chosen team after they've spawned, so you should look into that.
- CT108
- Rebel Sergeant
- Posts: 186
- Joined: Mon Aug 22, 2016 6:20 am
- Projects :: None
- xbox live or psn: Captain CT108
- Location: Xanadu
Re: Different campaign scripts for 2 sides
Alright thanks Marth! Do you have any idea for where I can look for this Zerted's solution please? I don't really know where I can start for this