Is it possible to divide my lua into 2 parts?
Posted: Tue Sep 07, 2010 10:04 am
by Deviss
hi there
i am using random model for all lua of my legions so when i want change one model i must modify 120 files :S , so i am searching a short way and for example i saw in stock scripts from space conquest they divide lua in 2, _Diet Dr. Pepper and _cmn
i tried this:
fel1x_con.lua
legion50x.lua
but dont work :S as always
such as i am trying make an universal file for all my luas so when i change model i only must modify one file, any idea
?
thanks in advance
fel1x_con.lua
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("legion50x")
ScriptCB_DoFile("ObjectiveConquest")
---------------------------------------------------------------------------
-- 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 ScriptPostLoad()
--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1-1"}
cp2 = CommandPost:New{name = "cp2-1"}
cp3 = CommandPost:New{name = "cp3-1"}
cp4 = CommandPost:New{name = "cp4-1"}
cp5 = CommandPost:New{name = "cp5-1"}
cp6 = CommandPost:New{name = "cp6-1"}
--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, textATT = "game.modes.con", textDEF = "game.modes.con2", multiplayerRules = true}
--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)
conquest:Start()
onfirstspawn = OnCharacterSpawn(
function(character)
if IsCharacterHuman(character) then
SetProperty(GetCharacterUnit(character), "AddHealth", 50)
end
end)
EnableSPHeroRules()
end
function ScriptInit()
StealArtistHeap(132*1024)
-- Designers, these two lines *MUST* be first.
SetPS2ModelMemory(3200000)
SetUberMode(1);
ReadDataFile("ingame.lvl")
-- Republic Attacking (attacker is always #1)
local REP = 1
local CIS = 2
-- These variables do not change
local ATT = 1
local DEF = 2
SetMemoryPoolSize("Music", 200)
ReadDataFile("sound\\fel.lvl;fel1cw")
ReadDataFile("dc:sound\\ABC.lvl;ABCcw")
SetMaxFlyHeight(53)
SetMaxPlayerFlyHeight (53)
ReadDataFile("SIDE\\rep.lvl",
"rep_hero_aalya")
ReadDataFile("dc:SIDE\\Republic.lvl",
"Republic_1",
"Republic_2",
"Republic_3",
"Republic_4",
"Republic_5",
"Republic_6",
"Republic_7",
"Republic_8",
"Republic_9")
ReadDataFile("dc:SIDE\\50X.lvl",
"rep_clone1",
"rep_clone2",
"rep_clone3",
"rep_clone4",
"rep_clone5",
"rep_clone6",
"rep_clone7",
"rep_clone8",
"rep_clone9")
ReadDataFile("dc:SIDE\\fed.lvl",
"cis_droid1",
"cis_droid2",
"cis_droid3",
"cis_droid4",
"cis_droid5",
"cis_droid6",
"cis_droid7",
"cis_droid9",
"cis_hero")
ReadDataFile("dc:SIDE\\veh.lvl",
"cis_tread_snailtank",
"rep_walk_oneman_atst")
SetAttackingTeam(ATT)
SetupTeams{
rep = {
team = REP,
units = 50,
reinforcements = 150,
soldier = { "rep_clone1",15, 20},
pilot = { "rep_clone2",4,5},
assault = { "rep_clone3",4,5},
sniper = { "rep_clone4",4,5},
marine = { "rep_clone5",4,5},
engineer = { "rep_clone6",4,5},
officer = { "rep_clone7",4,5},
special = { "rep_clone8",4,5},
commander = { "rep_clone9",2,3},
},
cis = {
team = CIS,
units = 50,
reinforcements = 150,
soldier = { "cis_droid1",10, 30},
pilot = { "cis_droid2",5,7},
assault = { "cis_droid3",5,7},
sniper = { "cis_droid4",5,7},
marine = { "cis_droid5",8,9},
engineer = { "cis_droid6",4,5},
officer = { "cis_droid7",4,5},
commander = { "cis_droid9",2,4},
},
}
SetHeroClass(REP, "rep_hero_aalya")
SetHeroClass(CIS, "cis_hero")
-- Level Stats
ClearWalkers()
-- AddWalkerType(0,
--AddWalkerType(5, 2) -- 2 attes with 2 leg pairs each
--AddWalkerType(3, 1) -- 3 acklays with 3 leg pairs each
AddWalkerType(1, 2)
AddWalkerType(0, 4)
local weaponCnt = 1600
SetMemoryPoolSize("Aimer", 1024)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("CommandWalker", 1)
SetMemoryPoolSize("EntityHover", 4)
SetMemoryPoolSize("EntityLight", 33)
SetMemoryPoolSize("EntitySoundStream", 100)
SetMemoryPoolSize("EntitySoundStatic", 200)
SetMemoryPoolSize("EntityWalker", 5)
SetMemoryPoolSize("MountedTurret", 100)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoldierAnimation", 1024)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("Weapon", 1024)
SetMemoryPoolSize("FlagItem", 5)
SetMemoryPoolSize("AcklayData", 6)
SetMemoryPoolSize("EntityFlyer", 6)
SetSpawnDelay(10.0, 0.25)
ReadDataFile("fel\\fel1.lvl", "fel1_conquest")
SetDenseEnvironment("false")
SetAIViewMultiplier(0.65)
--AddDeathRegion("Sarlac01")
-- Birdies
SetNumBirdTypes(1)
SetBirdType(0,1.0,"bird")
-- Sound Stats
voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)
voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)
OpenAudioStream("sound\\global.lvl", "cw_music")
OpenAudioStream("dc:sound\\ABC.lvl", "ABC_stream")
OpenAudioStream("sound\\fel.lvl", "fel1")
OpenAudioStream("sound\\fel.lvl", "fel1")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
-- OpenAudioStream("sound\\fel.lvl", "fel1_emt")
SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)
SetOutOfBoundsVoiceOver(1, "Repleaving")
SetOutOfBoundsVoiceOver(2, "Cisleaving")
SetAmbientMusic(REP, 1.0, "rep_fel_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_fel_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2,"rep_fel_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_fel_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_fel_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2,"cis_fel_amb_end", 2,1)
SetVictoryMusic(REP, "rep_fel_amb_victory")
SetDefeatMusic (REP, "rep_fel_amb_defeat")
SetVictoryMusic(CIS, "cis_fel_amb_victory")
SetDefeatMusic (CIS, "cis_fel_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")
-- Camera Stats
AddCameraShot(0.896307, -0.171348, -0.401716, -0.076796, -116.306931, 31.039505, 20.757469)
AddCameraShot(0.909343, -0.201967, -0.355083, -0.078865, -116.306931, 31.039505, 20.757469)
AddCameraShot(0.543199, 0.115521, -0.813428, 0.172990, -108.378189, 13.564240, -40.644150)
AddCameraShot(0.970610, 0.135659, 0.196866, -0.027515, -3.214346, 11.924586, -44.687294)
AddCameraShot(0.346130, 0.046311, -0.928766, 0.124267, 87.431061, 20.881388, 13.070729)
AddCameraShot(0.468084, 0.095611, -0.860724, 0.175812, 18.063482, 19.360580, 18.178158)
end
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("legion50x")
ScriptCB_DoFile("ObjectiveConquest")
---------------------------------------------------------------------------
-- 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 ScriptPostLoad()
--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1-1"}
cp2 = CommandPost:New{name = "cp2-1"}
cp3 = CommandPost:New{name = "cp3-1"}
cp4 = CommandPost:New{name = "cp4-1"}
cp5 = CommandPost:New{name = "cp5-1"}
cp6 = CommandPost:New{name = "cp6-1"}
--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, textATT = "game.modes.con", textDEF = "game.modes.con2", multiplayerRules = true}
--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)
conquest:Start()
onfirstspawn = OnCharacterSpawn(
function(character)
if IsCharacterHuman(character) then
SetProperty(GetCharacterUnit(character), "AddHealth", 50)
end
end)
EnableSPHeroRules()
end
function ScriptInit()
StealArtistHeap(132*1024)
-- Designers, these two lines *MUST* be first.
SetPS2ModelMemory(3200000)
SetUberMode(1);
ReadDataFile("ingame.lvl")
-- Republic Attacking (attacker is always #1)
local REP = 1
local CIS = 2
-- These variables do not change
local ATT = 1
local DEF = 2
SetMemoryPoolSize("Music", 200)
ReadDataFile("sound\\fel.lvl;fel1cw")
ReadDataFile("dc:sound\\ABC.lvl;ABCcw")
SetMaxFlyHeight(53)
SetMaxPlayerFlyHeight (53)
ReadDataFile("SIDE\\rep.lvl",
"rep_hero_aalya")
ReadDataFile("dc:SIDE\\Republic.lvl",
"Republic_1",
"Republic_2",
"Republic_3",
"Republic_4",
"Republic_5",
"Republic_6",
"Republic_7",
"Republic_8",
"Republic_9")
ReadDataFile("dc:SIDE\\50X.lvl",
"rep_clone1",
"rep_clone2",
"rep_clone3",
"rep_clone4",
"rep_clone5",
"rep_clone6",
"rep_clone7",
"rep_clone8",
"rep_clone9")
ReadDataFile("dc:SIDE\\fed.lvl",
"cis_droid1",
"cis_droid2",
"cis_droid3",
"cis_droid4",
"cis_droid5",
"cis_droid6",
"cis_droid7",
"cis_droid9",
"cis_hero")
ReadDataFile("dc:SIDE\\veh.lvl",
"cis_tread_snailtank",
"rep_walk_oneman_atst")
SetAttackingTeam(ATT)
SetupTeams{
rep = {
team = REP,
units = 50,
reinforcements = 150,
soldier = { "rep_clone1",15, 20},
pilot = { "rep_clone2",4,5},
assault = { "rep_clone3",4,5},
sniper = { "rep_clone4",4,5},
marine = { "rep_clone5",4,5},
engineer = { "rep_clone6",4,5},
officer = { "rep_clone7",4,5},
special = { "rep_clone8",4,5},
commander = { "rep_clone9",2,3},
},
cis = {
team = CIS,
units = 50,
reinforcements = 150,
soldier = { "cis_droid1",10, 30},
pilot = { "cis_droid2",5,7},
assault = { "cis_droid3",5,7},
sniper = { "cis_droid4",5,7},
marine = { "cis_droid5",8,9},
engineer = { "cis_droid6",4,5},
officer = { "cis_droid7",4,5},
commander = { "cis_droid9",2,4},
},
}
SetHeroClass(REP, "rep_hero_aalya")
SetHeroClass(CIS, "cis_hero")
-- Level Stats
ClearWalkers()
-- AddWalkerType(0,
--AddWalkerType(5, 2) -- 2 attes with 2 leg pairs each
--AddWalkerType(3, 1) -- 3 acklays with 3 leg pairs each
AddWalkerType(1, 2)
AddWalkerType(0, 4)
local weaponCnt = 1600
SetMemoryPoolSize("Aimer", 1024)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("CommandWalker", 1)
SetMemoryPoolSize("EntityHover", 4)
SetMemoryPoolSize("EntityLight", 33)
SetMemoryPoolSize("EntitySoundStream", 100)
SetMemoryPoolSize("EntitySoundStatic", 200)
SetMemoryPoolSize("EntityWalker", 5)
SetMemoryPoolSize("MountedTurret", 100)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoldierAnimation", 1024)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("Weapon", 1024)
SetMemoryPoolSize("FlagItem", 5)
SetMemoryPoolSize("AcklayData", 6)
SetMemoryPoolSize("EntityFlyer", 6)
SetSpawnDelay(10.0, 0.25)
ReadDataFile("fel\\fel1.lvl", "fel1_conquest")
SetDenseEnvironment("false")
SetAIViewMultiplier(0.65)
--AddDeathRegion("Sarlac01")
-- Birdies
SetNumBirdTypes(1)
SetBirdType(0,1.0,"bird")
-- Sound Stats
voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)
voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)
OpenAudioStream("sound\\global.lvl", "cw_music")
OpenAudioStream("dc:sound\\ABC.lvl", "ABC_stream")
OpenAudioStream("sound\\fel.lvl", "fel1")
OpenAudioStream("sound\\fel.lvl", "fel1")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
-- OpenAudioStream("sound\\fel.lvl", "fel1_emt")
SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)
SetOutOfBoundsVoiceOver(1, "Repleaving")
SetOutOfBoundsVoiceOver(2, "Cisleaving")
SetAmbientMusic(REP, 1.0, "rep_fel_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_fel_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2,"rep_fel_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_fel_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_fel_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2,"cis_fel_amb_end", 2,1)
SetVictoryMusic(REP, "rep_fel_amb_victory")
SetDefeatMusic (REP, "rep_fel_amb_defeat")
SetVictoryMusic(CIS, "cis_fel_amb_victory")
SetDefeatMusic (CIS, "cis_fel_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")
-- Camera Stats
AddCameraShot(0.896307, -0.171348, -0.401716, -0.076796, -116.306931, 31.039505, 20.757469)
AddCameraShot(0.909343, -0.201967, -0.355083, -0.078865, -116.306931, 31.039505, 20.757469)
AddCameraShot(0.543199, 0.115521, -0.813428, 0.172990, -108.378189, 13.564240, -40.644150)
AddCameraShot(0.970610, 0.135659, 0.196866, -0.027515, -3.214346, 11.924586, -44.687294)
AddCameraShot(0.346130, 0.046311, -0.928766, 0.124267, 87.431061, 20.881388, 13.070729)
AddCameraShot(0.468084, 0.095611, -0.860724, 0.175812, 18.063482, 19.360580, 18.178158)
end
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveConquest")
---------------------------------------------------------------------------
-- 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 ScriptPostLoad()
------------------------------------------------------------
--This is code for cycling rifleman models
------------------------------------------------------------
--KinetosImpetus
SetClassProperty("rep_clone3", "GeometryName", "rep_inf_Death_Star_Gunner")
SetClassProperty("rep_clone3", "GeometryLowRes", "rep_inf_Death_Star_Gunner_low1")
SetClassProperty("rep_clone4", "GeometryName", "rep_inf_Clone_Marshall")
SetClassProperty("rep_clone4", "GeometryLowRes", "rep_inf_Clone_Marshall_low1")
SetClassProperty("rep_clone5", "GeometryName", "rep_inf_AT-RT_Driver")
SetClassProperty("rep_clone5", "GeometryLowRes", "rep_inf_AT-RT_Driver_low1")
SetClassProperty("rep_clone6", "GeometryName", "rep_inf_ARF_trooper")
SetClassProperty("rep_clone6", "GeometryLowRes", "rep_inf_ARF_trooper_low1")
SetClassProperty("rep_clone6", "WeaponName1", "rep_weap_inf_chaingun")
SetClassProperty("rep_clone6", "WeaponName2", "rep_weap_DC-15a_Carbine")
SetClassProperty("rep_clone6", "WeaponName4", "rep_weap_inf_fusioncutter")
SetClassProperty("rep_clone7", "GeometryName", "imp_inf_The_Force_Unleashed_EVO_Trooper")
SetClassProperty("rep_clone7", "GeometryLowRes", "imp_inf_The_Force_Unleashed_EVO_Trooper")
--this little part ^ was for debugging really, it isn't necessary
-- Timer for skins--
--interval is the number of seconds between model changes
--maxskin is the number of versions to use
interval = 3 --i had been testing this at 10 second waves, but it could be changed
--in MP, it will probably cause each 15 second spawn-wave to be the same model
skintimer = CreateTimer("timeout") -- i don't know what significance "timeout" has, copied from hoth campaign this way
SetTimerValue(skintimer , interval )
--ShowTimer(skintimer ) --uncomment this line to see the timer onscreen
skin = 1
maxskin = 2
OnTimerElapse(
function(timer)
if (skin == 1) then
SetClassProperty("rep_clone3", "GeometryName", "rep_inf_ep3sniper")
SetClassProperty("rep_clone3", "GeometryLowRes", "rep_inf_ep3sniper_low1")
SetClassProperty("rep_clone4", "GeometryName", "rep_inf_ep3_Clone_Commander_Faie")
SetClassProperty("rep_clone4", "GeometryLowRes", "rep_inf_ep3_Clone_Commander_Faie_low1")
SetClassProperty("rep_clone5", "GeometryName", "rep_inf_Mandalorian_Soldier")
SetClassProperty("rep_clone5", "GeometryLowRes", "rep_inf_Mandalorian_Soldier_low1")
SetClassProperty("rep_clone6", "GeometryName", "rep_inf_ARC_trooper")
SetClassProperty("rep_clone6", "GeometryLowRes", "rep_inf_ARC_trooper_low1")
SetClassProperty("rep_clone6", "WeaponName1", "rep_weap_WeStar_M5a")
SetClassProperty("rep_clone6", "WeaponName2", "rep_weap_WeStar_M5s")
SetClassProperty("rep_clone6", "WeaponName4", "rep_weap_inf_wrist_caster")
SetClassProperty("rep_clone7", "GeometryName", "rep_inf_SandTrooper")
SetClassProperty("rep_clone7", "GeometryLowRes", "rep_inf_SandTrooper_low1")
end
if (skin == 2) then
SetClassProperty("rep_clone3", "GeometryName", "rep_inf_Death_Star_Gunner")
SetClassProperty("rep_clone3", "GeometryLowRes", "rep_inf_Death_Star_Gunner_low1")
SetClassProperty("rep_clone4", "GeometryName", "rep_inf_Clone_Marshall")
SetClassProperty("rep_clone4", "GeometryLowRes", "rep_inf_Clone_Marshall_low1")
SetClassProperty("rep_clone5", "GeometryName", "rep_inf_AT-RT_Driver")
SetClassProperty("rep_clone5", "GeometryLowRes", "rep_inf_AT-RT_Driver_low1")
SetClassProperty("rep_clone6", "GeometryName", "rep_inf_ARF_trooper")
SetClassProperty("rep_clone6", "GeometryLowRes", "rep_inf_ARF_trooper_low1")
SetClassProperty("rep_clone6", "WeaponName1", "rep_weap_inf_chaingun")
SetClassProperty("rep_clone6", "WeaponName2", "rep_weap_DC-15a_Carbine")
SetClassProperty("rep_clone6", "WeaponName4", "rep_weap_inf_fusioncutter")
SetClassProperty("rep_clone7", "GeometryName", "imp_inf_The_Force_Unleashed_EVO_Trooper")
SetClassProperty("rep_clone7", "GeometryLowRes", "imp_inf_The_Force_Unleashed_EVO_Trooper")
end
skin = skin + 1
if (skin > maxskin) then
skin = 1
end
--ShowTimer(nil)
--DestroyTimer(timer)
SetTimerValue(skintimer , interval )
StartTimer(skintimer)
end,
skintimer
)
-------------------------------------------------------------------------
--resume normal conquest script, or whatever gamemode...
--------------------------------------------------------------------------
StartTimer(skintimer) --starts the timer the first time, after it starts, it will restart itself one ending.
--------------wait start the timer first! ok, now go...
---------------------------------------------------------------------
ReadDataFile("dc:SIDE\\Republic.lvl",
"Republic_1",
"Republic_2",
"Republic_3",
"Republic_4",
"Republic_5",
"Republic_6",
"Republic_7",
"Republic_8",
"Republic_9")
ReadDataFile("dc:SIDE\\50X.lvl",
"rep_clone1",
"rep_clone2",
"rep_clone3",
"rep_clone4",
"rep_clone5",
"rep_clone6",
"rep_clone7",
"rep_clone8",
"rep_clone9")
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveConquest")
---------------------------------------------------------------------------
-- 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 ScriptPostLoad()
------------------------------------------------------------
--This is code for cycling rifleman models
------------------------------------------------------------
--KinetosImpetus
SetClassProperty("rep_clone3", "GeometryName", "rep_inf_Death_Star_Gunner")
SetClassProperty("rep_clone3", "GeometryLowRes", "rep_inf_Death_Star_Gunner_low1")
SetClassProperty("rep_clone4", "GeometryName", "rep_inf_Clone_Marshall")
SetClassProperty("rep_clone4", "GeometryLowRes", "rep_inf_Clone_Marshall_low1")
SetClassProperty("rep_clone5", "GeometryName", "rep_inf_AT-RT_Driver")
SetClassProperty("rep_clone5", "GeometryLowRes", "rep_inf_AT-RT_Driver_low1")
SetClassProperty("rep_clone6", "GeometryName", "rep_inf_ARF_trooper")
SetClassProperty("rep_clone6", "GeometryLowRes", "rep_inf_ARF_trooper_low1")
SetClassProperty("rep_clone6", "WeaponName1", "rep_weap_inf_chaingun")
SetClassProperty("rep_clone6", "WeaponName2", "rep_weap_DC-15a_Carbine")
SetClassProperty("rep_clone6", "WeaponName4", "rep_weap_inf_fusioncutter")
SetClassProperty("rep_clone7", "GeometryName", "imp_inf_The_Force_Unleashed_EVO_Trooper")
SetClassProperty("rep_clone7", "GeometryLowRes", "imp_inf_The_Force_Unleashed_EVO_Trooper")
--this little part ^ was for debugging really, it isn't necessary
-- Timer for skins--
--interval is the number of seconds between model changes
--maxskin is the number of versions to use
interval = 3 --i had been testing this at 10 second waves, but it could be changed
--in MP, it will probably cause each 15 second spawn-wave to be the same model
skintimer = CreateTimer("timeout") -- i don't know what significance "timeout" has, copied from hoth campaign this way
SetTimerValue(skintimer , interval )
--ShowTimer(skintimer ) --uncomment this line to see the timer onscreen
skin = 1
maxskin = 2
OnTimerElapse(
function(timer)
if (skin == 1) then
SetClassProperty("rep_clone3", "GeometryName", "rep_inf_ep3sniper")
SetClassProperty("rep_clone3", "GeometryLowRes", "rep_inf_ep3sniper_low1")
SetClassProperty("rep_clone4", "GeometryName", "rep_inf_ep3_Clone_Commander_Faie")
SetClassProperty("rep_clone4", "GeometryLowRes", "rep_inf_ep3_Clone_Commander_Faie_low1")
SetClassProperty("rep_clone5", "GeometryName", "rep_inf_Mandalorian_Soldier")
SetClassProperty("rep_clone5", "GeometryLowRes", "rep_inf_Mandalorian_Soldier_low1")
SetClassProperty("rep_clone6", "GeometryName", "rep_inf_ARC_trooper")
SetClassProperty("rep_clone6", "GeometryLowRes", "rep_inf_ARC_trooper_low1")
SetClassProperty("rep_clone6", "WeaponName1", "rep_weap_WeStar_M5a")
SetClassProperty("rep_clone6", "WeaponName2", "rep_weap_WeStar_M5s")
SetClassProperty("rep_clone6", "WeaponName4", "rep_weap_inf_wrist_caster")
SetClassProperty("rep_clone7", "GeometryName", "rep_inf_SandTrooper")
SetClassProperty("rep_clone7", "GeometryLowRes", "rep_inf_SandTrooper_low1")
end
if (skin == 2) then
SetClassProperty("rep_clone3", "GeometryName", "rep_inf_Death_Star_Gunner")
SetClassProperty("rep_clone3", "GeometryLowRes", "rep_inf_Death_Star_Gunner_low1")
SetClassProperty("rep_clone4", "GeometryName", "rep_inf_Clone_Marshall")
SetClassProperty("rep_clone4", "GeometryLowRes", "rep_inf_Clone_Marshall_low1")
SetClassProperty("rep_clone5", "GeometryName", "rep_inf_AT-RT_Driver")
SetClassProperty("rep_clone5", "GeometryLowRes", "rep_inf_AT-RT_Driver_low1")
SetClassProperty("rep_clone6", "GeometryName", "rep_inf_ARF_trooper")
SetClassProperty("rep_clone6", "GeometryLowRes", "rep_inf_ARF_trooper_low1")
SetClassProperty("rep_clone6", "WeaponName1", "rep_weap_inf_chaingun")
SetClassProperty("rep_clone6", "WeaponName2", "rep_weap_DC-15a_Carbine")
SetClassProperty("rep_clone6", "WeaponName4", "rep_weap_inf_fusioncutter")
SetClassProperty("rep_clone7", "GeometryName", "imp_inf_The_Force_Unleashed_EVO_Trooper")
SetClassProperty("rep_clone7", "GeometryLowRes", "imp_inf_The_Force_Unleashed_EVO_Trooper")
end
skin = skin + 1
if (skin > maxskin) then
skin = 1
end
--ShowTimer(nil)
--DestroyTimer(timer)
SetTimerValue(skintimer , interval )
StartTimer(skintimer)
end,
skintimer
)
-------------------------------------------------------------------------
--resume normal conquest script, or whatever gamemode...
--------------------------------------------------------------------------
StartTimer(skintimer) --starts the timer the first time, after it starts, it will restart itself one ending.
--------------wait start the timer first! ok, now go...
---------------------------------------------------------------------
ReadDataFile("dc:SIDE\\Republic.lvl",
"Republic_1",
"Republic_2",
"Republic_3",
"Republic_4",
"Republic_5",
"Republic_6",
"Republic_7",
"Republic_8",
"Republic_9")
ReadDataFile("dc:SIDE\\50X.lvl",
"rep_clone1",
"rep_clone2",
"rep_clone3",
"rep_clone4",
"rep_clone5",
"rep_clone6",
"rep_clone7",
"rep_clone8",
"rep_clone9")
such as i am trying make an universal file for all my luas so when i change model i only must modify one file, any idea
thanks in advance