I know, about many maps, where you may play only for single fraction, and only as single unit, with single life. I guess, it's cud be done by somehow editing Mission.lua, but not sure, how exactly. Any idea about that?
there's one or two lua switches that make it so you can only play as one team. I can't exactly remember atm.
My hunt mode script. The important line is,
ScriptCB_SetCanSwitchSides(nil)
. The stuff one unit with one life is in there as well. ---------------------------------------------------------------------------
-- 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(nil)
-- Attacker is always #1
local ALL = 2
local IMP = 1
-- These variables do not change
local ATT = 1
local DEF = 2
SetMaxFlyHeight(40)
SetMaxPlayerFlyHeight(40)
AddMissionObjective(ALL, "orange", "level.kashyyyk3.objectives.1");
AddMissionObjective(IMP, "orange", "level.kashyyyk3.objectives.1");
ReadDataFile("sound\\kas.lvl;kas1gcw");
ReadDataFile("NEWSOUNDS\\Darktrooper.lvl");
ReadDataFile("NEWSIDES\\darktrooperp1.lvl");
ReadDataFile("NEWSIDES\\wok.lvl",
"wok_inf_basic");
-- Alliance Stats
SetTeamName(ALL, "Wookies")
SetTeamIcon(ALL, "all_icon")
AddUnitClass(ALL, "wok_inf_mechanic", 10)
AddUnitClass(ALL, "wok_inf_rocketeer", 10)
AddUnitClass(ALL, "wok_inf_warrior", 30)
SetHeroClass(ALL, "wok_inf_warrior")
-- Imperial Stats
SetTeamName(IMP, "Empire")
SetTeamIcon(IMP, "imp_icon")
AddUnitClass(IMP, "imp_inf_darktrooperph1",0)
SetHeroClass(IMP, "imp_inf_darktrooperph1")
-- Attacker Stats
SetUnitCount(ATT, 1)
SetReinforcementCount(ATT, 1)
-- Defender Stats
SetUnitCount(DEF, 50)
SetReinforcementCount(DEF, 50)
-- Level Stats
ClearWalkers()
AddWalkerType(1, 3) -- 6 atsts with 1 leg pairs each
SetMemoryPoolSize("EntityHover", 0)
SetMemoryPoolSize("EntityFlyer", 4)
SetMemoryPoolSize ("MountedTurret",50)
-- SetMemoryPoolSize("EntityTauntaun", 0)
SetMemoryPoolSize("EntityCarrier", 0)
SetMemoryPoolSize("EntityBuildingArmedDynamic", 0)
SetMemoryPoolSize("PowerupItem", 40)
SetMemoryPoolSize("EntityMine", 40)
SetMemoryPoolSize("Aimer", 150)
SetMemoryPoolSize("Obstacle", 700)
SetMemoryPoolSize("EntityLight", 80)
SetSpawnDelay(1.0, 0.25)
ReadDataFile("NEWWORLDS\\kas3.lvl")
SetDenseEnvironment("false")
-- Birdies
SetNumBirdTypes(1);
SetBirdType(0,1.0,"bird");
SetBirdFlockMinHeight(-28.0);
-- Sound
OpenAudioStream("sound\\kas.lvl", "kasgcw_music");
OpenAudioStream("sound\\gcw.lvl", "gcw_vo");
OpenAudioStream("sound\\gcw.lvl", "gcw_tac_vo");
OpenAudioStream("sound\\kas.lvl", "kas");
OpenAudioStream("sound\\kas.lvl", "kas");
SetBleedingVoiceOver(ALL, ALL, "all_off_com_report_us_overwhelmed", 1);
SetBleedingVoiceOver(ALL, IMP, "all_off_com_report_enemy_losing", 1);
SetBleedingVoiceOver(IMP, ALL, "imp_off_com_report_enemy_losing", 1);
SetBleedingVoiceOver(IMP, IMP, "imp_off_com_report_us_overwhelmed", 1);
SetLowReinforcementsVoiceOver(ALL, ALL, "all_off_defeat_im", .1, 1);
SetLowReinforcementsVoiceOver(ALL, IMP, "all_off_victory_im", .1, 1);
SetLowReinforcementsVoiceOver(IMP, IMP, "imp_off_defeat_im", .1, 1);
SetLowReinforcementsVoiceOver(IMP, ALL, "imp_off_victory_im", .1, 1);
SetOutOfBoundsVoiceOver(2, "allleaving");
SetOutOfBoundsVoiceOver(1, "impleaving");
SetAmbientMusic(ALL, 1.0, "all_kas_amb_start", 0,1);
SetAmbientMusic(ALL, 0.99, "all_kas_amb_middle", 1,1);
SetAmbientMusic(ALL, 0.1,"all_kas_amb_end", 2,1);
SetAmbientMusic(IMP, 1.0, "imp_kas_amb_start", 0,1);
SetAmbientMusic(IMP, 0.99, "imp_kas_amb_middle", 1,1);
SetAmbientMusic(IMP, 0.1,"imp_kas_amb_end", 2,1);
SetVictoryMusic(ALL, "all_kas_amb_victory");
SetDefeatMusic (ALL, "all_kas_amb_defeat");
SetVictoryMusic(IMP, "imp_kas_amb_victory");
SetDefeatMusic (IMP, "imp_kas_amb_defeat");
SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin");
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout");
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null");
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null");
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit");
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter");
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change");
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter");
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit");
--SetSoundEffect("BirdScatter", "birdsFlySeq1");
SetPlanetaryBonusVoiceOver(IMP, IMP, 0, "imp_bonus_imp_medical");
SetPlanetaryBonusVoiceOver(IMP, ALL, 0, "imp_bonus_all_medical");
SetPlanetaryBonusVoiceOver(IMP, IMP, 1, "");
SetPlanetaryBonusVoiceOver(IMP, ALL, 1, "");
SetPlanetaryBonusVoiceOver(IMP, IMP, 2, "imp_bonus_imp_sensors");
SetPlanetaryBonusVoiceOver(IMP, ALL, 2, "imp_bonus_all_sensors");
SetPlanetaryBonusVoiceOver(IMP, IMP, 3, "imp_bonus_imp_hero");
SetPlanetaryBonusVoiceOver(IMP, ALL, 3, "imp_bonus_all_hero");
SetPlanetaryBonusVoiceOver(IMP, IMP, 4, "imp_bonus_imp_reserves");
SetPlanetaryBonusVoiceOver(IMP, ALL, 4, "imp_bonus_all_reserves");
SetPlanetaryBonusVoiceOver(IMP, IMP, 5, "imp_bonus_imp_sabotage");--sabotage
SetPlanetaryBonusVoiceOver(IMP, ALL, 5, "imp_bonus_all_sabotage");
SetPlanetaryBonusVoiceOver(IMP, IMP, 6, "");
SetPlanetaryBonusVoiceOver(IMP, ALL, 6, "");
SetPlanetaryBonusVoiceOver(IMP, IMP, 7, "imp_bonus_imp_training");--advanced training
SetPlanetaryBonusVoiceOver(IMP, ALL, 7, "imp_bonus_all_training");--advanced training
SetPlanetaryBonusVoiceOver(ALL, ALL, 0, "all_bonus_all_medical");
SetPlanetaryBonusVoiceOver(ALL, IMP, 0, "all_bonus_imp_medical");
SetPlanetaryBonusVoiceOver(ALL, ALL, 1, "");
SetPlanetaryBonusVoiceOver(ALL, IMP, 1, "");
SetPlanetaryBonusVoiceOver(ALL, ALL, 2, "all_bonus_all_sensors");
SetPlanetaryBonusVoiceOver(ALL, IMP, 2, "all_bonus_imp_sensors");
SetPlanetaryBonusVoiceOver(ALL, ALL, 3, "all_bonus_all_hero");
SetPlanetaryBonusVoiceOver(ALL, IMP, 3, "all_bonus_imp_hero");
SetPlanetaryBonusVoiceOver(ALL, ALL, 4, "all_bonus_all_reserves");
SetPlanetaryBonusVoiceOver(ALL, IMP, 4, "all_bonus_imp_reserves");
SetPlanetaryBonusVoiceOver(ALL, ALL, 5, "all_bonus_all_sabotage");--sabotage
SetPlanetaryBonusVoiceOver(ALL, IMP, 5, "all_bonus_imp_sabotage");
SetPlanetaryBonusVoiceOver(ALL, ALL, 6, "");
SetPlanetaryBonusVoiceOver(ALL, IMP, 6, "");
SetPlanetaryBonusVoiceOver(ALL, ALL, 7, "all_bonus_all_training");--advanced training
SetPlanetaryBonusVoiceOver(ALL, IMP, 7, "all_bonus_imp_training");--advanced training
-- Camera Stats
--Waterfall
AddCameraShot(0.958510, -0.002436, -0.285047, -0.000724, 23.167505, 5.900750, 59.443661);
end
Thank's! :)
note that you can only forces teams in single player, not multiplayer
Yes, I just need it, for another, single player mode, mission.lvl "back up" variation, of my future Nar Shaddaa project.
Is there a lua command that forces you onto the other team after you die once? I'm thinking of a zombie-type thing.
will this be like SKs new Zombie survival, or is this topic just for scrpting LUA files?
if only we could get
ScriptCB_SetCanSwitchSides(nil)
to work in MP servers. then some even more fun zombie mods would be possible.
Lets go new Zombie map woop woop! :cheer: