(SOLVED) script for ONLY Team 1 playable

Started by Ginev, July 02, 2013, 03:01:41 AM

Previous topic - Next topic
July 02, 2013, 03:01:41 AM Last Edit: July 02, 2013, 08:50:56 AM by Ginev
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.

Perhaps this one line, should be in Mission.LUA
--start header
function ScriptInit()
   ScriptCB_SetCanSwitchSides(nil)
Beauty is, the way to perfection.

Glory to Ukraine!  :mf:

Lol thanks alot.I try and its working. (solved)

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?

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.
Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

Yes this is not working in Multiplayer but in fact my campaign map is only for single player  :P

July 03, 2013, 12:41:08 AM #6 Last Edit: July 03, 2013, 12:46:35 AM by Phobos
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.

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..

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.

Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

ScriptCB_SetPlayerSide()

I think that's what your looking for, it only works in SP though.