Hello.
I have a quick question for experienced LUA scripters:
Is there a LUA Command / Line that makes only one team playable (ATT / DEF) for a specific map?
To make sure I am specific as possible I will provide the following scenario:
- Munge a New Map (Era: CW / Sides: Rep vs. Cis / Mode: Conquest)
Can I make the new map so it can only allow me to play with REP and restrict me from selecting CIS? (Just like in the Campaign.)
This is the code in BF1 - usually it works or there is an equivalent.
ScriptCB_SetPlayerSide(1,0)
ScriptCB_SetPlayerSide(1,1)
ScriptCB_SetCanSwitchSides(nil)
Referenced here (http://www.swbfgamers.com/index.php?topic=3886.msg40262#msg40262) - first number in each is the team you want forced.
Thank you very much for your response, Phantom.
I tried adding the lines to the SCRIPT, but it seems it crashes the game when the map loads in-game.
I used different variations, but still nothing. :P
Try ForceHumansOntoTeam1() for the republic or empire and ForceHumansOntoTeam1(0) for the cis, alliance.
Quote from: Commander Cody on March 02, 2018, 03:40:00 PM
Try ForceHumansOntoTeam1() for the republic or empire and ForceHumansOntoTeam1(0) for the cis, alliance.
It works like a charm.
Thank you very much, Cody.
Feedback (Update): - The only line that is valid for BFII LUA is ForceHumansOntoTeam1().
- It will restrict you to play with the SIDE which is marked as DEF in the script.
- The only solution to play with a side which is set as DEF (Team 2) by the default script, is to switch it to ATT (Team 1).