SWBFGamers

Modding for the Original SWBF1 and SWBF2 => Requests => Topic started by: Ginev on July 02, 2013, 03:01:41 AM

Title: (SOLVED) script for ONLY Team 1 playable
Post by: Ginev on July 02, 2013, 03:01:41 AM
Its been a long time and i forgot the script.If someone remember the script where only TEAM 1 can be played,please share it with me.I need the script for my campaign map.
Title: Re: script for ONLY Team 1 playable
Post by: Sereja on July 02, 2013, 03:42:08 AM
Perhaps this one line, should be in Mission.LUA
--start header
function ScriptInit()
   ScriptCB_SetCanSwitchSides(nil)
Title: Re: script for ONLY Team 1 playable
Post by: Ginev on July 02, 2013, 08:50:24 AM
Lol thanks alot.I try and its working. (solved)
Title: Re: (SOLVED) script for ONLY Team 1 playable
Post by: RepComm on July 02, 2013, 10:21:22 AM
So, that would confine you to 1 team, but which team does it confine you to?
And is this online compatible (like a server side mod) that anyone knows of?
Title: Re: (SOLVED) script for ONLY Team 1 playable
Post by: Led on July 02, 2013, 01:08:06 PM
Quote from: -RepublicCommando- on July 02, 2013, 10:21:22 AM
So, that would confine you to 1 team, but which team does it confine you to?
And is this online compatible (like a server side mod) that anyone knows of?

This does not work in MP.
Title: Re: (SOLVED) script for ONLY Team 1 playable
Post by: Ginev on July 03, 2013, 12:32:38 AM
Yes this is not working in Multiplayer but in fact my campaign map is only for single player  :P
Title: Re: (SOLVED) script for ONLY Team 1 playable
Post by: Phobos on July 03, 2013, 12:41:08 AM
Quote from: -RepublicCommando- on July 02, 2013, 10:21:22 AM
So, that would confine you to 1 team, but which team does it confine you to?
And is this online compatible (like a server side mod) that anyone knows of?
- It confines you to the team specified in the missionlist (either ATT or DEF based on if it is 1 or 2). I think default for modmaps is ATT team.
- No the executable code for MP disables this.
Title: Re: (SOLVED) script for ONLY Team 1 playable
Post by: RepComm on February 14, 2014, 02:52:03 PM
Serious bump, I know.
-- Could function ScriptInit()
   ScriptCB_SetCanSwitchSides(nil)

be changed to function ScriptInit()
   ScriptCB_SetCanSwitchSides(2)
To allow for the numerical specified team ( in this case team 2 ) to be the one used? It would be very convenient..
Title: Re: (SOLVED) script for ONLY Team 1 playable
Post by: Led on February 14, 2014, 04:55:21 PM
Quote from: -RepublicCommando- on February 14, 2014, 02:52:03 PM
Serious bump, I know.
-- Could function ScriptInit()
   ScriptCB_SetCanSwitchSides(nil)

be changed to function ScriptInit()
   ScriptCB_SetCanSwitchSides(2)
To allow for the numerical specified team ( in this case team 2 ) to be the one used? It would be very convenient..

I don't think so.  The function is expecting a true(1) or false(nil) value.

If you want to have a certain team be the team they must join, then just set up your mission.lua with team 1 as the team you want them to join.

Title: Re: (SOLVED) script for ONLY Team 1 playable
Post by: SleepKiller on February 14, 2014, 06:01:06 PM
ScriptCB_SetPlayerSide()

I think that's what your looking for, it only works in SP though.
EhPortal 1.34 © 2024, WebDev