How can you set up a map like the campaign missions so one side is unplayable and you can only play as one side? Like, you cannot choose differet.
I have looked through the shipped LUA's but no luck so far, does anybody know how?
Thanks
-Breakdown
Re: One Team Unplayable?
Posted: Fri Jul 10, 2009 9:42 pm
by Frog
well no its hard to edit campaign since its part of the game not just a insant map
Re: One Team Unplayable?
Posted: Fri Jul 10, 2009 9:49 pm
by breakdown
That's not what I am saying, I already know that...
What I was asking was how you can set up an instant map so only one team is selectable LIKE the campaign missions
Re: One Team Unplayable?
Posted: Fri Jul 10, 2009 11:15 pm
by Frog
oooooo
id either try seeing wat taking the out of your LUA but make a backup copy just incase cuz that might crash your map and if that dosent work then id study the luas of those campaign missions very carefully to see how they do it
Re: One Team Unplayable?
Posted: Fri Jul 10, 2009 11:33 pm
by Battleffront_Conquer
this is possible, I have done it in my map of Hoth.
You simply make the attacking team the team you wish to allow and the defending team the un-allowed. And all you have to add is "
ScriptCB_SetGameRules("campaign")"
where the scripts are called in. If you take a look at some of the shipped Lua's You might find some very interesting things.
Re: One Team Unplayable?
Posted: Sat Jul 11, 2009 10:47 am
by BattleBelk
Battleffront_Conquer wrote:this is possible, I have done it in my map of Hoth.
You simply make the attacking team the team you wish to allow and the defending team the un-allowed. And all you have to add is "
ScriptCB_SetGameRules("campaign")"
where the scripts are called in. If you take a look at some of the shipped Lua's You might find some very interesting things.
and of couse you did it for swbf2 right?
there is no ScriptCB_SetGameRules for swbf1
Maybe need play around with hystorical luas and with:
you will able to choose sides in singleplayer campaign
Bellow example for Naboo Plains (NAB1c_h.lua):
Hidden/Spoiler:
[code]---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()
ScriptCB_SetCanSwitchSides()
-- GUN Attacking (attacker is always #1)
local GUN = 2
local CIS = 1
-- These variables do not change
local ATT = 1
local DEF = 2
SetHistorical()