home *** CD-ROM | disk | FTP | other *** search
Text File | 2003-05-09 | 66.0 KB | 1,968 lines |
- -- Init.Lua
- -- ***********************************************************************************************
- -- ***********************************************************************************************
- -- **
- -- ** Global variables
- -- **
- -- ***********************************************************************************************
- -- ***********************************************************************************************
-
- -- globally define 'true' and 'false'
- true = 1
- false = nil
-
- -- mission states. Defined in code in scenariomanager.hpp
- MISSION_INPROGRESS = 0
- MISSION_FAILING = 1
- MISSION_FAILED = 2
- MISSION_SUCCESS = 3
- MISSION_SUCCEEDED = 4
- MISSION_ABORT = 5
-
- -- agent states. agent.hpp
-
- AGENT_NONDOMINANT = 0
- AGENT_CONTROLLER = 1
- AGENT_OCCUPATION = 2
- AGENT_CURIOUS = 3
- AGENT_COMBAT = 4
- AGENT_PANIC = 5
- AGENT_WANDER = 6
- AGENT_MADMAN = 7
-
- -- Pathfinder info: is a roomgrid cell passable or impassable?. DEFINED IN roomgrid.hpp
- DENSITY_IMPASSABLE = 0;
- DENSITY_PASSABLE = 1;
-
- -- game difficulty levels. gameflowmanager.hpp
- DIFFICULTY_EASY = 0
- DIFFICULTY_NORMAL = 1
- DIFFICULTY_HARD = 2
-
- -- controller types. controller.hpp
- CONTROLLER_GAMEPAD = 0
- CONTROLLER_KEYBOARD = 1
- CONTROLLER_MOUSE = 2
- CONTROLLER_NONE = 3
-
- -- controller game buttons. controller.hpp
- GAME_CONTROLLER_BUTTON_A = 0
- GAME_CONTROLLER_BUTTON_B = 1
- GAME_CONTROLLER_BUTTON_X = 2
- GAME_CONTROLLER_BUTTON_Y = 3
- GAME_CONTROLLER_BUTTON_START = 4
- GAME_CONTROLLER_BUTTON_SELECT = 5
- GAME_CONTROLLER_BUTTON_BACK = 6
- GAME_CONTROLLER_BUTTON_TRIGGER_LEFT = 7
- GAME_CONTROLLER_BUTTON_TRIGGER_RIGHT = 8
-
- -- controller sim buttons. controller.hpp
-
- SIM_CONTROLLER_BUTTON_PUNCH = 0
- SIM_CONTROLLER_BUTTON_GAMMA = 1
- SIM_CONTROLLER_BUTTON_ACTION = 2
- SIM_CONTROLLER_BUTTON_JUMP = 3
- SIM_CONTROLLER_BUTTON_FREELOOK = 4
- SIM_CONTROLLER_BUTTON_TARGET = 5
- SIM_CONTROLLER_BUTTON_START = 6
-
- -- controller game axes. controller.hpp
-
- GAME_CONTROLLER_AXIS_PRIMARY = 0
- GAME_CONTROLLER_AXIS_SECONDARY = 1
-
- -- controller sim axes. controller.hpp
-
- SIM_CONTROLLER_AXIS_MOVEMENT = 0
- SIM_CONTROLLER_AXIS_CHANGETARGET = 1
-
- -- controller axis indices. controller.hpp
-
- CONTROLLER_AXIS_INDEX_X = 0
- CONTROLLER_AXIS_INDEX_Y = 1
-
- --function gfm_GetDifficulty()
- -- return DIFFICULTY_NORMAL
- --end
-
- --function gfm_SetDifficulty()
- --end
-
-
- -- added global tuned health pickup values
- -- second stage tuning, if required, will take place in the scenario scripts for each level
-
- spm_SetMajorHealthBonus (15)
- spm_SetMinorHealthBonus (5)
- spm_SetMajorRageBonus (20)
- spm_SetMinorRageBonus (10)
-
- -- Sound Triggers for "low" health
-
- snd_Set_UserHealthDown( 70 )
- snd_Set_UserHealthNearDeath( 35 )
-
- -- Destroy Smart Props falling out of the level
-
- spm_SetDoYCheck( true )
- spm_SetYCheck( -250 )
-
-
- -- Health on various levels
- HULK_HEALTH_ON_BOSS_LEVELS = 850
- HULK_HEALTH_ON_MADMAN_LEVEL = 800
- HULK_HEALTH_ON_HL_LEVEL = 680
- -- Half-life's health on C1L5 is multiplied by this number
- HL_HEALTH_MOD_ON_C1L5 = 1.1
-
- -- Set up combo feedback
- -- eurostile extended bold
- -- Explanation: up to '3' is BLANK, 3-5 is COMBO_1, etc.
- -- sm_AddComboGrade( 3, "BLANK" )
- -- sm_AddComboGrade( 5, "TBS_COMBO_1" ) -- ANGRY!
- sm_ResetComboSystem()
- sm_AddComboGrade( 3, "BLANK" )
- sm_AddComboGrade( 5, "TBS_COMBO_1" ) -- ANGRY!
- sm_AddComboGrade( 8, "TBS_COMBO_7" ) -- FIERCE!
- sm_AddComboGrade( 12, "TBS_COMBO_4" ) -- ENRAGED!
- sm_AddComboGrade( 18, "TBS_COMBO_3" ) -- SAVAGE!
- sm_AddComboGrade( 25, "TBS_COMBO_2") -- FURIOUS!
- sm_AddComboGrade( 50, "TBS_COMBO_5" ) -- INCREDIBLE!
- sm_SetComboTimerLimit( 0.85 )
- sm_SetComboHitText( "TBS_COMBO_HITS_4" )
- sm_SetBonusPointText( "TBS_CHALLENGE_HUD_POINTS" )
- sm_SetBonusPointSingularText( "TBS_CHALLENGE_HUD_POINTS_3" )
- sm_SetBonusTimeText( "TBS_CHALLENGE_HUD_TIME" )
-
-
- -- KMC: needed for little hack. If this number is > 0, then play a dram-cam on Hulk's electrocution node.
- -- Right now (and probably forever), this is only true in C1L5, the first time Hulk punches Half-life.
- -- I define it here so that, when the fight tree asks for it, it's at least always defined
- hulk_electrocution_cam = 0
-
- -- ***********************************************************************************************
- -- ***********************************************************************************************
-
-
- function get_level()
-
- local chapter = gfm_GetChapter()
- local level = gfm_GetLevel()
- whichlevel = "C" .. chapter .. "L" .. level
- -- write( "get_level() returning " .. whichlevel .. "\n" )
- return whichlevel
-
- end
-
- -- Collectable FUNCTIONS ---------------------------------------------------------------------------
-
- -- "global" variables for the collectable checks
- npc_collectable_slider = 2
- -- 0 = no collectables
-
- npc_collectable_chance = 0 -- THIS MUST BE ZERO :)
-
- npc_collectable_minor_major = {} -- Add this to the chance for a Major collectable .. + is a bonus , - is a penalty
-
- npc_collectable_default_minor_major = 15 -- Default chance for EVERYONE to have a major.
-
- npc_collectable_minor_major[DIFFICULTY_EASY] = 10
- npc_collectable_minor_major[DIFFICULTY_NORMAL] = 0
- npc_collectable_minor_major[DIFFICULTY_HARD] = -10
-
- npc_collectable_minor_major["assaulter"] = 0
- npc_collectable_minor_major["shocktroop"] = -5
- npc_collectable_minor_major["unarmedsoldier"] = -15
- npc_collectable_minor_major["missilesoldier"] = 25
- npc_collectable_minor_major["shockshielder"] = 15
- npc_collectable_minor_major["leader_bot"] = 50
-
- npc_collectable_minor_major["alpha_guard"] = 0
- npc_collectable_minor_major["gamma_guard"] = 30
- npc_collectable_minor_major["alpha_missilesoldier"] = 25
- npc_collectable_minor_major["alpha_shockshielder"] = 15
- npc_collectable_minor_major["alpha_shocktroop"] = 15
- npc_collectable_minor_major["gamma_elite"] = 40
-
- npc_collectable_minor_major["scientist"] = -75
-
- npc_collectable_minor_major["gamma_dog"] = 20
-
- npc_collectable_minor_major["half_life"] = 100
- npc_collectable_minor_major["mad_man"] = 100
- npc_collectable_minor_major["flux"] = 100
- npc_collectable_minor_major["ravage"] = 100
- npc_collectable_minor_major["leader"] = 100
-
- npc_collectable_minor_major["colonel_ryker"] = -100
-
- npc_collectable_minor_major["tank"] = 75
- npc_collectable_minor_major["blackhawk"] = -100
- npc_collectable_minor_major["apache"] = -100
- npc_collectable_minor_major["blackhawk_leader"] = -100
- npc_collectable_minor_major["apache_leader"] = -100
-
- npc_collectable_health_rage = {}
-
- npc_collectable_default_health_rage = 60 -- The chance of the collectable being HEALTH
-
- npc_collectable_health_rage[DIFFICULTY_EASY] = 10
- npc_collectable_health_rage[DIFFICULTY_NORMAL] = 0
- npc_collectable_health_rage[DIFFICULTY_HARD] = -10
-
- npc_collectable_health_rage["assaulter"] = 0
- npc_collectable_health_rage["shocktroop"] = 0
- npc_collectable_health_rage["unarmedsoldier"] =0
- npc_collectable_health_rage["missilesoldier"] = 5
- npc_collectable_health_rage["shockshielder"] = 5
- npc_collectable_health_rage["leader_bot"] = 10
-
- npc_collectable_health_rage["alpha_guard"] = 0
- npc_collectable_health_rage["gamma_guard"] = 10
- npc_collectable_health_rage["alpha_missilesoldier"] = 5
- npc_collectable_health_rage["alpha_shockshielder"] = 5
- npc_collectable_health_rage["alpha_shocktroop"] = 5
- npc_collectable_health_rage["gamma_elite"] = 15
-
- npc_collectable_health_rage["scientist"] = 0
-
- npc_collectable_health_rage["gamma_dog"] = 5
-
- npc_collectable_health_rage["half_life"] = 50
- npc_collectable_health_rage["mad_man"] = 25
- npc_collectable_health_rage["flux"] = 25
- npc_collectable_health_rage["ravage"] = 25
- npc_collectable_health_rage["leader"] = 25
-
- npc_collectable_health_rage["colonel_ryker"] = -100
-
- npc_collectable_health_rage["tank"] = 50
- npc_collectable_health_rage["blackhawk"] = 0
- npc_collectable_health_rage["apache"] = 0
- npc_collectable_health_rage["blackhawk_leader"] = 0
- npc_collectable_health_rage["apache_leader"] = 0
-
- npc_collectable_minor_major["C0L1"] = 0
-
- npc_collectable_minor_major["C1L1"] = 0
- npc_collectable_minor_major["C1L2"] = 0
- npc_collectable_minor_major["C1L3"] = 0
- npc_collectable_minor_major["C1L4"] = 0
- npc_collectable_minor_major["C1L5"] = 0
-
- npc_collectable_minor_major["C2L1"] = 0
- npc_collectable_minor_major["C2L2"] = 0
- npc_collectable_minor_major["C2L4"] = 0
- npc_collectable_minor_major["C2L5"] = 0
-
- npc_collectable_minor_major["C3L1"] = 0
- npc_collectable_minor_major["C3L2"] = 0
- npc_collectable_minor_major["C3L3"] = 0
- npc_collectable_minor_major["C3L4"] = 0
-
- npc_collectable_minor_major["C4L1"] = 0
- npc_collectable_minor_major["C4L2"] = 0
- npc_collectable_minor_major["C4L3"] = 0
- npc_collectable_minor_major["C4L4"] = 0
-
- npc_collectable_minor_major["C5L1"] = 0
- npc_collectable_minor_major["C5L2"] = 0
- npc_collectable_minor_major["C5L3"] = 0
- npc_collectable_minor_major["C5L4"] = 0
-
- npc_collectable_minor_major["C9L1"] = 0
- npc_collectable_minor_major["C9L2"] = 0
- npc_collectable_minor_major["C9L3"] = 0
- npc_collectable_minor_major["C9L4"] = 0
- npc_collectable_minor_major["C9L5"] = 0
- npc_collectable_minor_major["C9L6"] = 0
- npc_collectable_minor_major["C9L7"] = 0
-
- npc_collectable_minor_major["default"] = 0
-
- npc_collectable_health_rage["C0L1"] = 0
-
- npc_collectable_health_rage["C1L1"] = 0
- npc_collectable_health_rage["C1L2"] = 0
- npc_collectable_health_rage["C1L3"] = 0
- npc_collectable_health_rage["C1L4"] = 0
- npc_collectable_health_rage["C1L5"] = 0
-
- npc_collectable_health_rage["C2L1"] = 0
- npc_collectable_health_rage["C2L2"] = 0
- npc_collectable_health_rage["C2L4"] = 0
- npc_collectable_health_rage["C2L5"] = 0
-
- npc_collectable_health_rage["C3L1"] = 0
- npc_collectable_health_rage["C3L2"] = 0
- npc_collectable_health_rage["C3L3"] = 0
- npc_collectable_health_rage["C3L4"] = 0
-
- npc_collectable_health_rage["C4L1"] = 0
- npc_collectable_health_rage["C4L2"] = 0
- npc_collectable_health_rage["C4L3"] = 0
- npc_collectable_health_rage["C4L4"] = 0
-
- npc_collectable_health_rage["C5L1"] = 0
- npc_collectable_health_rage["C5L2"] = 0
- npc_collectable_health_rage["C5L3"] = 0
- npc_collectable_health_rage["C5L4"] = 0
-
- npc_collectable_health_rage["C9L1"] = 0
- npc_collectable_health_rage["C9L2"] = 0
- npc_collectable_health_rage["C9L3"] = 0
- npc_collectable_health_rage["C9L4"] = 0
- npc_collectable_health_rage["C9L5"] = 0
- npc_collectable_health_rage["C9L6"] = 0
- npc_collectable_health_rage["C9L7"] = 0
-
- npc_collectable_health_rage["default"] = 0
-
- function npc_collectable_assign (name, template )
-
- local difficulty = DIFFICULTY_NORMAL
- if gfm_GetDifficulty == nil then
- difficulty = DIFFICULTY_NORMAL
- else
- difficulty = gfm_GetDifficulty()
- end
- -- if difficulty == nil then
- -- write( "DIFFICULTY == nil !\n" )
- -- else
- -- write( "Difficulty was okay. Value of " .. difficulty .. "\n" )
- -- end
-
- level = get_level()
- -- write( "Name = " .. name .. " Template = " .. template .. "\n" )
-
- mm_chance = npc_collectable_default_minor_major + npc_collectable_minor_major[difficulty] + npc_collectable_minor_major[template] + npc_collectable_minor_major[level]
- hr_chance = npc_collectable_default_health_rage + npc_collectable_health_rage[difficulty] + npc_collectable_health_rage[template] + npc_collectable_health_rage[level]
-
- --debug ("[OMGc] " .. name .. " says mm: " .. mm_chance .. " hr: " .. hr_chance)
-
- if random (1,100) <= mm_chance then
- major = 1
- else
- major = 0
- end
-
- if random (1,100) <= hr_chance then
- health = 1
- else
- health = 0
- end
-
- if major == 1 and health == 1 then
- am_SetActorCollectable( name, 1 )
- --debug ("[OMGc] " .. name .. " new system: Major Health")
- end
-
- if major == 0 and health == 1 then
- am_SetActorCollectable( name, 2 )
- --debug ("[OMGc] " .. name .. " new system: Minor Health")
- end
-
- if major == 1 and health == 0 then
- am_SetActorCollectable( name, 3 )
- --debug ("[OMGc] " .. name .. " new system: Major Rage")
- end
-
- if major == 0 and health == 0 then
- am_SetActorCollectable( name, 4 )
- --debug ("[OMGc] " .. name .. " new system: Minor Rage")
- end
-
- end
-
- function npc_collectable_assign_banner ( name, template )
-
- end
-
- -----------------------------------------------------------------------------------------------------------
-
- -- a nice string representation of things
- function string_val_single(v)
- local retstr = ''
- debug("grrr");
- if type(v) == 'table' then
- retstr = retstr .. "{ ";
- for ind,val in v do
- debug(level, ind, val)
- retstr = retstr .. format("[%s] = ", string_val(ind))
- if type(val) == 'table' then
- retstr = retstr .. string_val(val, 1)
- retstr = retstr .. ", "
- else
- retstr = retstr .. format("%s, ", string_val(val))
- end
- end
- retstr = retstr .. "}"
- elseif type(v) == 'string' then
- retstr = "'" .. gsub(v,"([\\'])", "\\%1") .. "'"
- elseif type(v) == 'number' then
- retstr = tostring(v)
- else
- retstr = format("<%s>", tostring(v))
- end
- return retstr
- end
-
- level = 0
- function string_val(...)
- local retstr = ''
- for i = 1, arg.n, 1 do
- if i > 1 then retstr = retstr .. ', ' end
- level = level + 1
- retstr = retstr .. string_val_single(arg[i])
- level = level - 1
- end
- return retstr
- end
-
- function print_globals()
- -- g is a table of all global variables
- local g = globals()
- for ind,val in g do
- -- ick! What if val is a table ? ? ? urk ... I'm not even handling strings, although I don't think that's a problem...
- if type( val ) == 'number' then
- debug( ind, val )
- -- sh_StoreGlobal( ind, val )
- end
- end
- write( "End of print_globals\n" )
- end
-
- -- ***********************************************************************************************
- -- ***********************************************************************************************
- -- **
- -- ** Global helper functions, in-sim specific
- -- ** i.e. do NOT call these from the front-end!
- -- **
- -- ***********************************************************************************************
- -- ***********************************************************************************************
-
- ---------------------------------------------------------------
- -- Generate an actor at the specified locator
- ---------------------------------------------------------------
- function GenerateActor( model, locator, team, path, leashed, name )
- success = am_CreateActor( model, locator, team, path, leashed, name )
- if success == nil then
- write( name .. " could NOT be generated.\n" )
- else
- write( name .. " has been generated.\n" )
- if(am_GetEnemyCount()> 10) then
- write( "--- WARNING: " .. am_GetEnemyCount() .." Enemies created ---\n")
- am_KillEnemy(1)
- end
- end
- return success
- end
-
- ---------------------------------------------------------------
- -- Generate a PropActor ex: autogun, spotlight
- -- templatename : name of the base actor
- -- propname : name of the SmartProp instance associated to that Actor
- -- Aim Joint name : name of the aim Joint, (it's the Muzzle for the autoguns, and the light source in the SpotLight
- -- patrolpathname : name of the PatrolPath, needes for spotlight objects only
- ---------------------------------------------------------------
- function GeneratePropActor( templatename, propname, aimjointname, patrolpathname )
- success = am_CreatePropActor( templatename, propname, aimjointname, patrolpathname )
- if success == nil then
- write( propname .. " could NOT be generated.\n" )
- else
- write( propname .. " has been generated.\n" )
- end
- return success
- end
-
- ---------------------------------------------------------------
- -- Move an actor to the specified locator
- ---------------------------------------------------------------
- function MoveActorToLocator( actor, locator )
- local locExists = tvm_DoesLocatorExist( locator )
- if locExists ~= nil then
- v = tvm_GetLocatorPosition( locator )
- am_SetActorPosition( actor, v )
- orientation = tvm_GetLocatorOrientation( locator )
- write( "MoveActorToLocator: orientation = " .. orientation .. "\n" )
- am_SetActorOrientation( actor, orientation )
- else
- write ("MoveActorToLocator: Unable to locate " .. locator .. "\n")
- end
- end
-
- ---------------------------------------------------------------
- -- Make an actor face the specified locator
- ---------------------------------------------------------------
- function OrientActorToLocator( actor, locator )
- if locator == nil or actor == nil then
- return
- end
- local locExists = tvm_DoesLocatorExist( locator )
- if locExists ~= nil then
- local actorPos = am_GetActorPosition( actor )
- local locatorPos = tvm_GetLocatorPosition( locator )
- local actorToLocator = VectorSub( locatorPos, actorPos )
- local orientation = util_GetWorldOrientation( actorToLocator.x, actorToLocator.z )
- am_SetActorOrientation( actor, orientation )
- write( "OrientActorToLocator: orientation = " .. orientation .. "\n" )
- else
- write ("OrientActorToLocator: Unable to locate " .. locator .. "\n")
- end
- end
-
-
- ---------------------------------------------------------------
- -- Wait for X seconds
- ---------------------------------------------------------------
- function Wait( seconds )
- local timeElapsed = 0
- while timeElapsed < seconds do
- timeElapsed = timeElapsed + time_GetElapsedTime()
- yield()
- end
- end
-
-
- ---------------------------------------------------------------
- -- Wait for there to be less then or exactly X enemies left alive
- -- Example usage:
- -- Wait_EnemyCount( 0 ) --> wait for all enemies to die
- -- Wait_EnemyCount( 4 ) --> wait for there to be 4 or less enemies left alive
- ---------------------------------------------------------------
- function Wait_EnemyCount( count )
- while am_GetEnemyCount() > count do
- yield()
- end
- end
-
-
- ---------------------------------------------------------------
- -- Wait for the given actor (string) to enter the specified trigger_volume (string)
- -- Example usage:
- -- Wait_ActorInTriggerVolume( "hulk", "C1L2R2_tv_u2" )
- ---------------------------------------------------------------
- function Wait_ActorInTriggerVolume( actor, trigger_volume )
- write("Waiting for " .. actor .. " to enter volume " .. trigger_volume .. "... \n")
- while tvm_IsActorInTriggerVolume( actor, trigger_volume ) == nil do
- yield()
- end
- write("done\n")
- end
-
-
- ---------------------------------------------------------------
- -- Wait for there to be less then or exactly X enemies left alive,
- -- OR for the given actor (string) to enter the specified trigger_volume (string)
- -- Example usage:
- -- Wait_EnemyCount_or_ActorInTriggerVolume( 4, "hulk", "C1L2R2_tv_u2" )
- ---------------------------------------------------------------
- function Wait_EnemyCount_or_ActorInTriggerVolume( count, actor, trigger_volume )
- write("Waiting for " .. actor .. " to enter volume " .. trigger_volume .. " or enemy count <= " .. count .. "...")
- while am_GetEnemyCount() > count and tvm_IsActorInTriggerVolume( actor, trigger_volume ) == nil do
- yield()
- end
- write("done\n")
- if( am_GetEnemyCount() <= count) then
- write ("Enemy count = " .. count .. "\n")
- end
- if( tvm_IsActorInTriggerVolume( actor, trigger_volume ) ~= nil ) then
- write (actor .. " in trigger volume" .. trigger_volume .. "\n")
- end
- end
-
-
- ---------------------------------------------------------------
- -- Play an FMV, and wait for the FMV to finish
- -- Example usage:
- -- Wait_PlayMovie( "SC1_3" )
- ---------------------------------------------------------------
- function Wait_PlayMovie( fmv )
- yield()
- nism_FadeToBlack(1)
- Wait(1)
- write( "Playing FMV <" .. fmv .. ">. Waiting for end...\n" )
- fmvm_PlayMovieWithAudio( fmv, 2000 )
- while fmvm_IsPlaying() do
- yield()
- end
- nism_FadeToBlack(0)
- nism_FadeFromBlack(1)
- write("FMV done.\n")
- end
-
- function Wait_PlayMovieNoFadeIn( fmv )
- yield()
- write( "Playing FMV <" .. fmv .. ">. Waiting for end...\n" )
- fmvm_PlayMovieWithAudio( fmv, 2000 )
- -- fmvm_PlayMovie( fmvWithPath, 2000 )
- while fmvm_IsPlaying() do
- yield()
- end
- nism_FadeToBlack(0)
- nism_FadeFromBlack(1)
- write("FMV done.\n")
- end
-
-
-
- ---------------------------------------------------------------
- -- Play an FMV.
- -- Example usage:
- -- PlayMovie( "SC1_3" )
- ---------------------------------------------------------------
- function PlayMovie( fmv )
- yield()
- write( "Playing FMV <" .. fmv .. ">.\n" )
- fmvm_PlayMovieWithAudio( fmv, 2000 )
- end
-
-
- function BeginMovieMode()
- hud_ShowHUD(nil)
- hud_ShowMessages(nil)
- nism_LetterBoxOn()
- end
-
- function EndMovieMode()
- hud_ShowHUD(true)
- hud_ShowMessages(true)
- nism_LetterBoxOff()
- end
-
-
-
-
- ---------------------------------------------------------------
- -- Play an NIS, and wait for the NIS to finish
- -- Example usage:
- -- Wait_PlayNIS( "c1l1_nis_01" )
- ---------------------------------------------------------------
- function Wait_PlayNIS( nis )
- write( "Playing NIS <" .. nis .. ">. Waiting for end...\n" )
- BeginMovieMode()
- nism_Play( nis, 2000 )
- while nism_IsPlaying() do
- yield()
- end
- nism_Unload( nis )
- EndMovieMode()
- write("NIS done.\n")
- end
-
- function Wait_PlayNIS_Callback( nis, callback, frame )
- write( "Playing NIS <" .. nis .. ">. Waiting for end...\n" )
- BeginMovieMode()
- nism_Play( nis, 2000 )
- nism_SetLuaCallback(callback, frame);
- while nism_IsPlaying() do
- yield()
- end
- nism_Unload( nis )
- EndMovieMode()
- write("NIS done.\n")
- end
-
- function PlayNIS( nis )
- write( "Playing NIS <" .. nis .. ">.\n")
- BeginMovieMode()
- nism_Play( nis, 2000 )
- end
-
- function PlayNISAtLocator( nis, loc )
- write( "Playing NIS <" .. nis .. ">.\n" )
- BeginMovieMode()
- nism_PlayAtLocator( nis, loc, 2000 )
- end
-
- function PlayNISNoSkip( nis )
- write( "Playing NIS <" .. nis .. ">.\n" )
- BeginMovieMode()
- nism_Play( nis, -1 ) -- -1 means no skip allowed
- end
-
- function WaitNIS( nis )
- write( "Waiting on NIS <" .. nis .. ">.\n")
- while nism_IsPlaying() do
- yield()
- end
- nism_Unload( nis )
- EndMovieMode()
- write("NIS done.\n")
- end
-
-
-
- ---------------------------------------------------------------
- -- Play an NIS, and wait for the NIS to finish, but dont allow the user to skip
- -- Example usage:
- -- Wait_PlayNISNoSkip( "c1l1_nis_01" )
- ---------------------------------------------------------------
- function Wait_PlayNISNoSkip( nis )
- write( "Playing NIS <" .. nis .. ">. Waiting for end...\n" )
- BeginMovieMode()
- nism_Play( nis, -1 ) -- -1 means no skip allowed
- while nism_IsPlaying() do
- yield()
- end
- nism_Unload( nis )
- EndMovieMode()
- write("NIS done.\n")
- end
-
- ---------------------------------------------------------------
- -- Play an NIS at specified locator, and wait for the NIS to finish
- -- Example usage:
- -- Wait_PlayNIS( "c1l1_nis_02", "C1L1_loc_nis02" )
- ---------------------------------------------------------------
- function Wait_PlayNISAtLocator( nis, loc )
- write( "Playing NIS <" .. nis .. ">. Waiting for end...\n" )
- BeginMovieMode()
- nism_PlayAtLocator( nis, loc, 2000 )
- while nism_IsPlaying() do
- yield()
- end
- nism_Unload( nis )
- EndMovieMode()
- write("NIS done.\n")
- end
-
-
-
-
- ---------------------------------------------------------------
- --
- -- NOT CURRENTLY BEING USED!
- -- I created this function when I thought that the occupation agent
- -- invoked the path script *every* frame. In fact, it only calls the
- -- path script when it reaches a way point. Oh well. At least we
- -- used first-class functions for a brief moment.
- -- --kmc
- --
- --
- -- Generic function to call for paths.
- -- Designers, you don't want to look at this. Only use it. :)
- --
- -- The second parameter (waypoint_function) is a function. The intent is that this
- -- function gets called whenever we're at a waypoint. It takes "actor" (string) and way point number
- -- as parameters, and doesn't have a return value.
- --
- -- Here's a sample function that you could pass, for a path with 3 way points:
- --
- -- function waypoint_function( actor, waypoint )
- -- if waypoint == 0 then
- -- write( "Actor <" .. actor .. "> has reached waypoint 0.\n" )
- -- am_AdvanceWayPoint( actor )
- --
- -- elseif waypoint == 1 then
- -- write( "Actor <" .. actor .. "> has reached waypoint 1.\n" )
- -- am_AdvanceWayPoint( actor )
- --
- -- elseif waypoint == 2 then
- -- write( "Actor <" .. actor .. "> has reached the end of the path.\n" )
- -- am_Unleash( actor )
- --
- -- else
- -- -- what the?! There are only 2 way points in this path... ?
- -- error( "C1L2R2_spwnpat_u2: invalid path.\n" )
- -- end
- -- end
- --
- ---------------------------------------------------------------
- function DoPath_DONOTUSE( actor, waypoint_function )
- -- Get the last and next way points.
- -- If they are the same, then we are AT a way point. If not, we are on our way...
- local last_way_point = am_GetLastWayPoint( actor )
- local next_way_point = am_GetNextWayPoint( actor )
-
- -- Check to see if we're at a way point or in transition
- if last_way_point == next_way_point then
- waypoint_function( actor, last_way_point )
- end
- end
-
-
- -- ***********************************************************************************************
- -- ***********************************************************************************************
- -- **
- -- ** Global helper functions
- -- ** Can be used anywhere
- -- **
- -- ***********************************************************************************************
- -- ***********************************************************************************************
-
- ---------------------------------------------------------------
- -- Distance between two rmt::Vectors
- ---------------------------------------------------------------
- function VectorDistance( v, w )
- local dx = v.x - w.x
- local dy = v.y - w.y
- local dz = v.z - w.z
- local dist = (dx^2 + dy^2 + dz^2)^0.5
- return dist
- end
-
- ---------------------------------------------------------------
- -- Vector addition
- ---------------------------------------------------------------
- function VectorAdd( v, w )
- local retval = Vector( v )
- retval.x = retval.x + w.x
- retval.y = retval.y + w.y
- retval.z = retval.z + w.z
- return retval
- end
-
- ---------------------------------------------------------------
- -- Vector substraction
- ---------------------------------------------------------------
- function VectorSub( v, w )
- local retval = Vector( v )
- retval.x = retval.x - w.x
- retval.y = retval.y - w.y
- retval.z = retval.z - w.z
- return retval
- end
-
- ---------------------------------------------------------------
- -- Vector scale
- ---------------------------------------------------------------
- function VectorScale( v, scale )
- local retval = Vector( v )
- retval.x = retval.x * scale
- retval.y = retval.y * scale
- retval.z = retval.z * scale
- return retval
- end
-
- -------------------------------------------------------------
- -- Enemy Generators
- -------------------------------------------------------------
- -- bsmedley - augest 6th 2002
- -------------------------------------------------------------
-
- -- kmc
- -- 1st line: "I'd like to make sure I have <count> free slots. Kill anyone that's been off-camera for <exptime> seconds or more."
- -- 2nd line: "Hey! I really need those <count> free slots! Since there still aren't enough, kill ANYONE that is off-camera. Period."
- -- 3rd line: "Cripes! I STILL don't have <count> free slots?! Screw it. Give me <count> slots, even if it means killing enemies that are on camera."
- -- I love reading Kevin's comments. CRIPES!
-
- function FreeEnemySlots( count, exptime )
- if am_FreeEnemySlots( count, exptime ) < count then
- if am_FreeEnemySlots( count, 0.001 ) < count then
- am_FreeEnemySlots( count, -1 )
- end
- end
- end
-
- function generate_wave( nameprefix, unit, template, team, number)
- -- Generate a Wave
- debug("[OMGgw]Generating " .. number .. " of " .. template)
- write ("Generating " .. number .. " of " .. template .. "\n")
- local spawned = 0
- for element = 1,10 do
- local name = nameprefix .. "_" .. unit .. "_g" .. element
- local locator = nameprefix .. "_eg_" .. unit .. "_g" .. element
- local leashed = nil
- local path = "none"
- if tvm_DoesLocatorExist( locator ) then
- success = am_CreateActor( template, locator, team, path, leashed, name )
- if success == nil then
- write( name .. " - " .. template .. " could NOT be generated.\n" )
- else
- spawned = spawned + 1
- write( spawned .. "> " .. name .. " has been generated\n" )
- debug("[OMGgw]" .. spawned .. "> " .. name .. " has been generated")
- if npc_collectable_slider ~= 0 then
- npc_collectable_assign(name,template)
- end
- if(am_GetEnemyCount()> 10) then
- write( "--- WARNING: " .. am_GetEnemyCount() .." Enemies created ---\n")
- am_FreeEnemySlots ( 1, -1 )
- end -- enemy count
- if spawned == number then
- return spawned
- end
- end -- success
- end -- locator exist
- end -- for loop
- if spawned ~= number then
- write ("--- Warning unable to generate requested number enemies ---\n")
- end
- return spawned
- end
-
- function generate_wave_pathed( nameprefix, unit, template, team, number, onleash )
- -- Generate a Wave
- debug("[OMGgw]Generating " .. number .. " of " .. template)
- write ("Generating " .. number .. " of " .. template .. "\n")
- local spawned = 0
- for element = 1,10 do
- local name = nameprefix .. "_" .. unit .. "_g" .. element
- local locator = nameprefix .. "_eg_" .. unit .. "_g" .. element
- if onleash == 1 then
- leashed = 1
- else
- leashed = nil
- end
- local path = nameprefix .. "_spwnpat_" .. unit .. "_g" .. element
- if tvm_DoesLocatorExist( locator ) then
- success = am_CreateActor( template, locator, team, path, leashed, name )
- if success == nil then
- write( name .. " could NOT be generated.\n" )
- else
- spawned = spawned + 1
- am_SetAlertStatus(name,3)
- write( spawned .. "> " .. name .. " has been generated\n" )
- debug("[OMGgw]" .. spawned .. "> " .. name .. " has been generated")
- if npc_collectable_slider ~= 0 then
- npc_collectable_assign(name,template)
- end
- if(am_GetEnemyCount()> 10) then
- write( "--- WARNING: " .. am_GetEnemyCount() .." Enemies created ---\n")
- am_FreeEnemySlots ( 1, -1 )
- end -- enemy count
- if spawned == number then
- return spawned
- end
- end -- success
- end -- locator exist
- end -- for loop
- if spawned ~= number then
- write ("--- Warning unable to generate requested number enemies ---\n")
- end
- return spawned
- end
-
- function generate_wave_pathed_banner( nameprefix, unit, template, team, number, onleash )
- -- Generate a Wave
- write ("Generating " .. number .. " of " .. template .. "\n")
- local spawned = 0
- for element = 1,10 do
- local name = nameprefix .. "_" .. unit .. "_g" .. element
- local locator = nameprefix .. "_eg_" .. unit .. "_g" .. element
- if onleash == 1 then
- leashed = 1
- else
- leashed = nil
- end
- local path = nameprefix .. "_spwnpat_" .. unit .. "_g" .. element
- if tvm_DoesLocatorExist( locator ) then
- success = am_CreateActor( template, locator, team, path, leashed, name )
- if success == nil then
- write( name .. " could NOT be generated.\n" )
- else
- spawned = spawned + 1
- -- if npc_collectable_slider ~= 0 then
- -- npc_collectable_assign_banner(name,template)
- -- end
- write( spawned .. "> " .. name .. " has been generated\n" )
- if(am_GetEnemyCount()> 10) then
- write( "--- WARNING: " .. am_GetEnemyCount() .." Enemies created ---\n")
- am_FreeEnemySlots ( 1, -1 )
- end -- enemy count
- if spawned == number then
- return spawned
- end
- end -- success
- end -- locator exist
- end -- for loop
- if spawned ~= number then
- write ("--- Warning unable to generate requested number enemies ---\n")
- end
- return spawned
- end
-
- function generate_solo (nameprefix, unit, template, team, ident)
-
- -- Generate a Single Enemy
-
- local name = nameprefix .. "_" .. unit .. "_g" .. ident
- local locator = nameprefix .. "_eg_" .. unit .. "_g" .. ident
- local leashed = nil
- local path = "none"
- if tvm_DoesLocatorExist( locator ) then
- success = am_CreateActor( template, locator, team, path, leashed, name )
- if success == nil then
- write( name .. " could NOT be generated.\n" )
- return 0
- else
- write( name .. " has been generated\n" )
- if npc_collectable_slider ~= 0 then
- npc_collectable_assign(name,template)
- end
- if(am_GetEnemyCount() > 10) then
- write( "--- WARNING: " .. am_GetEnemyCount() .." Enemies created ---\n")
- am_FreeEnemySlots ( 1, -1 )
- end -- enemy count
- return 1
- end -- success
- end -- locator exist
-
- return 0
- end
-
- function generate_solo_pathed (nameprefix, unit, template, team, ident, onleash )
-
- -- Generate a Single Enemy leashed to a Path
-
- local name = nameprefix .. "_" .. unit .. "_g" .. ident
- local locator = nameprefix .. "_eg_" .. unit .. "_g" .. ident
-
- if onleash == 1 then
- leashed = 1
- else
- leashed = nil
- end
- local path = nameprefix .. "_spwnpat_" .. unit .. "_g" .. ident
- if tvm_DoesLocatorExist( locator ) then
- success = am_CreateActor( template, locator, team, path, leashed, name )
- if success == nil then
- write( name .. " could NOT be generated.\n" )
- return 0
- else
- write( name .. " has been generated\n" )
- am_SetAlertStatus(name,3)
- if npc_collectable_slider ~= 0 then
- npc_collectable_assign(name,template)
- end
- if(am_GetEnemyCount()> 10) then
- write( "--- WARNING: " .. am_GetEnemyCount() .." Enemies created ---\n")
- am_FreeEnemySlots ( 1, -1 )
- end -- enemy count
- return 1
- end -- success
- else
- print('WARNING: localtor', locator, 'does not exists')
- end -- locator exist
-
- return 0
- end
-
- function generate_solo_pathed_banner (nameprefix, unit, template, team, ident, onleash )
-
- -- Generate a Single Enemy leashed to a Path
-
- local name = nameprefix .. "_" .. unit .. "_g" .. ident
- local locator = nameprefix .. "_eg_" .. unit .. "_g" .. ident
-
- if onleash == 1 then
- leashed = 1
- else
- leashed = nil
- end
- local path = nameprefix .. "_spwnpat_" .. unit .. "_g" .. ident
- if tvm_DoesLocatorExist( locator ) then
- success = am_CreateActor( template, locator, team, path, leashed, name )
- if success == nil then
- write( name .. " could NOT be generated.\n" )
- return 0
- else
- write( name .. " has been generated\n" )
- -- if npc_collectable_slider ~= 0 then
- -- npc_collectable_assign_banner(name,template)
- -- end
- if(am_GetEnemyCount()> 10) then
- write( "--- WARNING: " .. am_GetEnemyCount() .." Enemies created ---\n")
- am_FreeEnemySlots ( 1, -1 )
- end -- enemy count
- return 1
- end -- success
- else
- print('WARNING: localtor', locator, 'does not exists')
- end -- locator exist
-
- return 0
- end
-
- function respawn_wave ( nameprefix, unit, template, team, number )
-
- local numGenerated = 0
- for element = 1,number do
- local name = nameprefix .. "_" .. unit .. "_g" .. element
- if am_FindActorIndex(name) == -1 then
- total_spawns = total_spawns +1
- write ("Total Spawns: " .. total_spawns .. "--> ")
- numGenerated = numGenerated + generate_solo ( nameprefix, unit, template, team, element )
- am_UpdateKnownPlayerPos( name )
- end
- end
-
- return numGenerated
- end
-
- function respawn_wave_pathed ( nameprefix, unit, template, team, number )
-
- for element = 1,number do
- local name = nameprefix .. "_" .. unit .. "_g" .. element
- if am_FindActorIndex(name) == -1 then
- total_spawns = total_spawns +1
- write ("Total Spawns: " .. total_spawns .. "--> ")
- generate_solo_pathed ( nameprefix, unit, template, team, element, 1 )
- am_UpdateKnownPlayerPos( name )
-
- end
- end
-
- end
-
-
- -------------------------------------------------------------
- --- End of Enemy Generators
- -------------------------------------------------------------
-
- -------------------------------------------------------------
- --- FindPlayer_Wave
- --- bsmedley aug 1st 2002
- -------------------------------------------------------------
-
- function findplayer_wave (nameprefix, unit, number)
-
- for element = 1,number do
- local name = nameprefix .. "_" .. unit .. "_g" .. element
- if am_FindActorIndex(name) ~= -1 then
- am_UpdateKnownPlayerPos(name)
- end
- end
-
- end
- -------------------------------------------------------------
-
-
- function cameraCutToActor( name )
-
- local pos = am_GetActorPosition( name )
- cm_SetScriptCamStaticV( 45, 0, pos, 5 )
- cm_SetScriptCamShot( 75, 3, nil )
- cm_SwitchToScriptCamera(nil,nil)
-
- end
-
- function WaitForScriptCamera()
- while cm_IsScriptCameraPlaying() do
- yield()
- end
- end
-
- -- return a string that will represt the name of an actor using the actor
- -- naming convention for our levels
- function ActorName(roomprefix, unit, instance)
- return roomprefix .. "_" .. unit .. "_g" .. instance
- end
-
- --
- -- Controller button mapping initialization for the Keyboard
- --
- -- Default GAME buttons and axes are used by the frontend
- -- Default SIM buttons and axes are used during gameplay
-
- -- Game button maps
- -- Format is: controller type,
- -- controller button (i.e, function),
- -- DirectInput button name,
- -- input point number
- --
- -- A single game button (function) may have more than one input point (key mapped to
- -- the function). The number of input points is not configurable via init.lua
-
- --com_SetDefaultGameButtonMap(CONTROLLER_KEYBOARD, GAME_CONTROLLER_BUTTON_A, "Enter", 0)
- --com_SetDefaultGameButtonMap(CONTROLLER_KEYBOARD, GAME_CONTROLLER_BUTTON_A, "Space", 1)
- --com_SetDefaultGameButtonMap(CONTROLLER_KEYBOARD, GAME_CONTROLLER_BUTTON_B, "Esc", 0)
- --com_SetDefaultGameButtonMap(CONTROLLER_KEYBOARD, GAME_CONTROLLER_BUTTON_Y, "Delete", 0)
- --com_SetDefaultGameButtonMap(CONTROLLER_KEYBOARD, GAME_CONTROLLER_BUTTON_BACK, "Esc", 0)
- --com_SetDefaultGameButtonMap(CONTROLLER_KEYBOARD, GAME_CONTROLLER_BUTTON_START, "Enter", 0)
- --com_SetDefaultGameButtonMap(CONTROLLER_KEYBOARD, GAME_CONTROLLER_BUTTON_START, "Space", 1)
-
- -- Game axis maps
- -- Format is: controller type,
- -- axis type,
- -- axis index
- -- input point number
- -- DirectInput button name,
- --
- -- A single game axis has 3 input points.
- -- The number of input points is not configurable via init.lua
-
- --com_SetDefaultGameAxisMap(CONTROLLER_KEYBOARD, GAME_CONTROLLER_AXIS_PRIMARY, CONTROLLER_AXIS_INDEX_X, 0, "Right")
- --com_SetDefaultGameAxisMap(CONTROLLER_KEYBOARD, GAME_CONTROLLER_AXIS_PRIMARY, CONTROLLER_AXIS_INDEX_X, 2, "Left")
- --com_SetDefaultGameAxisMap(CONTROLLER_KEYBOARD, GAME_CONTROLLER_AXIS_PRIMARY, CONTROLLER_AXIS_INDEX_Y, 0, "Up")
- --com_SetDefaultGameAxisMap(CONTROLLER_KEYBOARD, GAME_CONTROLLER_AXIS_PRIMARY, CONTROLLER_AXIS_INDEX_Y, 2, "Down")
-
- --com_SetDefaultGameAxisMap(CONTROLLER_KEYBOARD, GAME_CONTROLLER_AXIS_SECONDARY, CONTROLLER_AXIS_INDEX_X, 0, "Num 6")
- --com_SetDefaultGameAxisMap(CONTROLLER_KEYBOARD, GAME_CONTROLLER_AXIS_SECONDARY, CONTROLLER_AXIS_INDEX_X, 2, "Num 4")
- --com_SetDefaultGameAxisMap(CONTROLLER_KEYBOARD, GAME_CONTROLLER_AXIS_SECONDARY, CONTROLLER_AXIS_INDEX_Y, 0, "Num 8")
- --com_SetDefaultGameAxisMap(CONTROLLER_KEYBOARD, GAME_CONTROLLER_AXIS_SECONDARY, CONTROLLER_AXIS_INDEX_Y, 2, "Num 2")
-
- -- Sim button maps
- -- Format is: controller type,
- -- controller button (i.e, function),
- -- DirectInput button name,
- -- input point number
- --
- -- A single game button (function) may have more than one input point (key mapped to
- -- the function). The number of input points is not configurable via init.lua
-
- --com_SetDefaultSimButtonMap(CONTROLLER_KEYBOARD, SIM_CONTROLLER_BUTTON_PUNCH, "Num 4", 0)
- --com_SetDefaultSimButtonMap(CONTROLLER_KEYBOARD, SIM_CONTROLLER_BUTTON_GAMMA, "Num 8", 0)
- --com_SetDefaultSimButtonMap(CONTROLLER_KEYBOARD, SIM_CONTROLLER_BUTTON_ACTION, "Num 6", 0)
- --com_SetDefaultSimButtonMap(CONTROLLER_KEYBOARD, SIM_CONTROLLER_BUTTON_JUMP, "Space", 0)
- --com_SetDefaultSimButtonMap(CONTROLLER_KEYBOARD, SIM_CONTROLLER_BUTTON_JUMP, "Ctrl", 1)
- --com_SetDefaultSimButtonMap(CONTROLLER_KEYBOARD, SIM_CONTROLLER_BUTTON_FREELOOK, "Right Shift", 0)
- --com_SetDefaultSimButtonMap(CONTROLLER_KEYBOARD, SIM_CONTROLLER_BUTTON_FREELOOK, "Num Enter", 1)
- --com_SetDefaultSimButtonMap(CONTROLLER_KEYBOARD, SIM_CONTROLLER_BUTTON_TARGET, "Num 0", 0)
- --com_SetDefaultSimButtonMap(CONTROLLER_KEYBOARD, SIM_CONTROLLER_BUTTON_START, "Esc", 0)
-
- -- Sim axis maps
- -- Format is: controller type,
- -- axis type,
- -- axis index
- -- input point number
- -- DirectInput button name,
- --
- -- A single game axis has 3 input points.
- -- The number of input points is not configurable via init.lua
-
- --com_SetDefaultSimAxisMap(CONTROLLER_KEYBOARD, SIM_CONTROLLER_AXIS_MOVEMENT, CONTROLLER_AXIS_INDEX_X, 0, "D")
- --com_SetDefaultSimAxisMap(CONTROLLER_KEYBOARD, SIM_CONTROLLER_AXIS_MOVEMENT, CONTROLLER_AXIS_INDEX_X, 2, "A")
- --com_SetDefaultSimAxisMap(CONTROLLER_KEYBOARD, SIM_CONTROLLER_AXIS_MOVEMENT, CONTROLLER_AXIS_INDEX_Y, 0, "W")
- --com_SetDefaultSimAxisMap(CONTROLLER_KEYBOARD, SIM_CONTROLLER_AXIS_MOVEMENT, CONTROLLER_AXIS_INDEX_Y, 2, "S")
- --com_SetDefaultSimAxisMap(CONTROLLER_KEYBOARD, SIM_CONTROLLER_AXIS_CHANGETARGET, CONTROLLER_AXIS_INDEX_X, 0, "Right")
- --com_SetDefaultSimAxisMap(CONTROLLER_KEYBOARD, SIM_CONTROLLER_AXIS_CHANGETARGET, CONTROLLER_AXIS_INDEX_X, 2, "Left")
- --com_SetDefaultSimAxisMap(CONTROLLER_KEYBOARD, SIM_CONTROLLER_AXIS_CHANGETARGET, CONTROLLER_AXIS_INDEX_Y, 0, "Up")
- --com_SetDefaultSimAxisMap(CONTROLLER_KEYBOARD, SIM_CONTROLLER_AXIS_CHANGETARGET, CONTROLLER_AXIS_INDEX_Y, 2, "Down")
-
- -- pass in 1 to reset once only upon first launching the game
- -- DO NOT pass in 0 unless you REALLY really want this done each time
- -- init.lua is read
- -- This actually sets the controller mappings to be the default mappings
- com_ResetToDefaultMapping(1)
-
- -- Load screens
- -- Format is Level, ImageFileName, Title, Text, Hint, Justicication (0 left, 1 centre, 2 right)
- SetLoadScreenInfo("C0L1", "C0L1_loadscreen", "TBS_C0L1_NAME", "TBS_LOAD_TEXT_SUB2_1", "TBS_OBJECTIVE_REMINDER_1", 2)
-
- SetLoadScreenInfo("C1L1", "C1L1_loadscreen", "TBS_C1L1_NAME", "TBS_LOAD_TEXT_SUB2_2", "TBS_FREEZE_HINT", 0)
- SetLoadScreenInfo("C1L2", "C1L2_loadscreen", "TBS_C1L2_NAME", "TBS_LOAD_TEXT_SUB2_3", "TBS_HELIHINT1", 2)
- SetLoadScreenInfo("C1L3", "C1L3_loadscreen", "TBS_C1L3_NAME", "TBS_LOAD_TEXT_SUB2_4", "TBS_SMASH_WALLS_HINT", 0)
- SetLoadScreenInfo("C1L4", "C1L4_loadscreen", "TBS_C1L4_NAME", "TBS_LOAD_TEXT_SUB2_5", "TBS_PUNCHBACK", 2)
- SetLoadScreenInfo("C1L5", "C1L5_loadscreen", "TBS_C1L5_NAME", "TBS_LOAD_TEXT_SUB2_6", "TBS_HL_GENERATORS", 2)
-
- SetLoadScreenInfo("C2L1", "C2L1_loadscreen", "TBS_C2L1_NAME", "TBS_LOAD_TEXT_SUB2_7", "TBS_COMBO_SNEAK_GRAPPLE", 0)
- SetLoadScreenInfo("C2L2", "C2L2_loadscreen", "TBS_C2L2_NAME", "TBS_LOAD_TEXT_SUB2_8", "TBS_COMBO_TIMING", 2)
- SetLoadScreenInfo("C2L4", "C2L4b_loadscreen", "TBS_C2L4_NAME", "TBS_LOAD_TEXT_SUB2_10", "TBS_OBJECTIVE_REMINDER_22", 0)
- SetLoadScreenInfo("C2L5", "C2L4_loadscreen", "TBS_C2L5_NAME", "TBS_LOAD_TEXT_SUB2_11", "TBS_DESTROY_CONSOLES", 0)
-
- SetLoadScreenInfo("C3L1", "C3L1_loadscreen", "TBS_C3L1_NAME", "TBS_LOAD_TEXT_SUB2_12", "TBS_OBJECTIVE_REMINDER_26", 0)
- SetLoadScreenInfo("C3L2", "C3L2_loadscreen", "TBS_C3L2_NAME", "TBS_LOAD_TEXT_SUB2_13", "TBS_RAGEMODE_START", 2)
- SetLoadScreenInfo("C3L3", "C3L3_loadscreen", "TBS_C3L3_NAME", "TBS_LOAD_TEXT_SUB2_14", "TBS_TANKHINT1", 0)
- SetLoadScreenInfo("C3L4", "C3L4_loadscreen", "TBS_C3L4_NAME", "TBS_LOAD_TEXT_SUB2_15", "TBS_FLUX_DAMAGE", 0)
-
- SetLoadScreenInfo("C4L1", "C4L1_loadscreen", "TBS_C4L1_NAME", "TBS_LOAD_TEXT_SUB2_16", "TBS_FIGHT_4_RAGE", 2)
- SetLoadScreenInfo("C4L2", "C4L2_loadscreen", "TBS_C4L2_NAME", "TBS_LOAD_TEXT_SUB2_17", "TBS_RAGE_DAMAGE_2", 2)
- SetLoadScreenInfo("C4L3", "C4L3_loadscreen", "TBS_C4L3_NAME", "TBS_LOAD_TEXT_SUB2_19", "TBS_OBJECTIVE_REMINDER_41", 1)
- SetLoadScreenInfo("C4L4", "C4L4_loadscreen", "TBS_C4L4_NAME", "TBS_LOAD_TEXT_SUB2_20", "TBS_RAVAGE_TACTICS", 0)
-
- SetLoadScreenInfo("C5L1", "C5L1_loadscreen", "TBS_C5L1_NAME", "TBS_LOAD_TEXT_SUB2_22", "TBS_OBJECTIVE_REMINDER_49", 2)
- SetLoadScreenInfo("C5L2", "C5L1b_loadscreen", "TBS_C5L1_NAME", "TBS_LOAD_TEXT_SUB2_22", "TBS_OBJECTIVE_REMINDER_49", 1)
- SetLoadScreenInfo("C5L3", "C5L2_loadscreen", "TBS_C5L2_NAME", "TBS_LOAD_TEXT_SUB2_23", "TBS_LEADER_TACTICS_1", 0)
- SetLoadScreenInfo("C5L4", "C5L3_loadscreen", "TBS_C5L3_NAME", "TBS_LOAD_TEXT_SUB2_24", "TBS_OBJECTIVE_REMINDER_53", 2)
-
- SetLoadScreenInfo("C9L1", "C9L1_loadscreen", "TBS_CHALLENGE_FE_ENDURANCE_MODE_1", "TBS_CHALLENGE1_Title", "", 1)
- SetLoadScreenInfo("C9L2", "C9L2_loadscreen", "TBS_CHALLENGE_FE_TIME_ATTACK_MODE_1", "TBS_CHALLENGE2_Title", "", 0)
- SetLoadScreenInfo("C9L3", "C9L3_loadscreen", "TBS_MENU_ITEM_CHALLENGE_FE_HULK_SMASH_MODE", "TBS_CHALLENGE3_Body1", "", 2)
- SetLoadScreenInfo("C9L5", "C9L4_loadscreen", "TBS_CHALLENGE_FE_ENDURANCE_MODE_2", "TBS_CHALLENGE1_Title", "", 0)
- SetLoadScreenInfo("C9L6", "C9L5_loadscreen", "TBS_CHALLENGE_FE_TIME_ATTAC_MODE_2", "TBS_CHALLENGE2_Title", "", 0)
-
- -- Set Level Load Times
- -- SetLevelLoadTime(ps2, xbox, gamecube, other) (Just kidding Katrina! :)
- -- Tune this later
-
- -- SetLevelLoadTime("C0L1", 12.9, 12.9, 12.9, 12.9)
- -- SetLevelLoadTime("C1L1", 10.0, 10.0, 10.0, 10.0)
- -- SetLevelLoadTime("C1L2", 13.1, 13.1, 13.1, 13.1)
- -- SetLevelLoadTime("C1L3", 14.5, 14.5, 14.5, 14.5)
- -- SetLevelLoadTime("C1L4", 14.7, 14.7, 14.7, 14.7)
- -- SetLevelLoadTime("C1L5", 11.2, 11.2, 11.2, 11.2)
- -- SetLevelLoadTime("C2L1", 11.3, 11.3, 11.3, 11.3)
- -- SetLevelLoadTime("C2L2", 15.9, 15.9, 15.9, 15.9)
- -- SetLevelLoadTime("C2L4", 14.5, 14.5, 14.5, 14.5)
- -- SetLevelLoadTime("C2L5", 14.1, 14.1, 14.1, 14.1)
- -- SetLevelLoadTime("C3L1", 12.6, 12.6, 12.6, 12.6)
- -- SetLevelLoadTime("C3L2", 15.3, 15.3, 15.3, 15.3)
- -- SetLevelLoadTime("C3L3", 13.8, 13.8, 13.8, 13.8)
- -- SetLevelLoadTime("C3L4", 11.0, 11.0, 11.0, 11.0)
- -- SetLevelLoadTime("C4L1", 12.0, 12.0, 12.0, 12.0)
- -- SetLevelLoadTime("C4L2", 16.2, 16.2, 16.2, 16.2)
- -- SetLevelLoadTime("C4L3", 12.9, 12.9, 12.9, 12.9)
- -- SetLevelLoadTime("C4L4", 12.6, 12.6, 12.6, 12.6)
- -- SetLevelLoadTime("C5L1", 12.3, 12.3, 12.3, 12.3)
- -- SetLevelLoadTime("C5L2", 13.1, 13.1, 13.1, 13.1)
- -- SetLevelLoadTime("C5L3", 13.1, 13.1, 13.1, 13.1)
- -- SetLevelLoadTime("C5L4", 13.1, 13.1, 13.1, 13.1)
- -- SetLevelLoadTime("C9L1", 12.8, 12.8, 12.8, 12.8)
- -- SetLevelLoadTime("C9L2", 12.4, 12.4, 12.4, 12.4)
- -- SetLevelLoadTime("C9L3", 12.1, 12.1, 12.1, 12.1)
- -- SetLevelLoadTime("C9L4", 12.0, 12.0, 12.0, 12.0)
- -- SetLevelLoadTime("C9L5", 14.2, 14.2, 14.2, 14.2)
-
- SetLevelSelectInfo("C0L1", "TBS_C0L1_TEXT", 0, 0, 1)
- SetLevelSelectInfo("C1L1", "TBS_C1L1_TEXT", 1, 1, 1)
- SetLevelSelectInfo("C1L2", "TBS_C1L2_TEXT", 2, 1, 2)
- SetLevelSelectInfo("C1L3", "TBS_C1L3_TEXT", 3, 1, 3)
- SetLevelSelectInfo("C1L4", "TBS_C1L4_TEXT", 4, 1, 4)
- SetLevelSelectInfo("C1L5", "TBS_C1_BOSS_TEXT", 5, 1, 5)
- SetLevelSelectInfo("C2L1", "TBS_C2L1_TEXT", 6, 2, 1)
- SetLevelSelectInfo("C2L2", "TBS_C2L2_TEXT", 7, 2, 2)
- SetLevelSelectInfo("C2L4", "TBS_C2L4_TEXT", 8, 2, 4)
- SetLevelSelectInfo("C2L5", "TBS_C2_BOSS_TEXT", 9, 2, 5)
- SetLevelSelectInfo("C3L1", "TBS_C3L1_TEXT", 10, 3, 1)
- SetLevelSelectInfo("C3L2", "TBS_C3L2_TEXT", 11, 3, 2)
- SetLevelSelectInfo("C3L3", "TBS_C3L3_TEXT", 12, 3, 3)
- SetLevelSelectInfo("C3L4", "TBS_C3_BOSS_TEXT", 13, 3, 4)
- SetLevelSelectInfo("C4L1", "TBS_C4L1_TEXT", 14, 4, 1)
- SetLevelSelectInfo("C4L2", "TBS_C4L2_TEXT", 15, 4, 2)
- SetLevelSelectInfo("C4L3", "TBS_C4L3_TEXT", 16, 4, 3)
- SetLevelSelectInfo("C4L4", "TBS_C4_BOSS_TEXT", 17, 4, 4)
- SetLevelSelectInfo("C5L1", "TBS_C5L1_TEXT", 18, 5, 1)
- SetLevelSelectInfo("C5L2", "", -1, -1, -1)
- SetLevelSelectInfo("C5L3", "TBS_C5_BOSS_TEXT", 20, 5, 3)
- SetLevelSelectInfo("C5L4", "TBS_C5L2_TEXT", 21, 5, 4)
- SetLevelSelectInfo("C9L1", " ", 22, 9, 1)
- SetLevelSelectInfo("C9L2", " ", 23, 9, 2)
- SetLevelSelectInfo("C9L3", " ", 24, 9, 3)
- SetLevelSelectInfo("C9L5", " ", 25, 9, 5)
- SetLevelSelectInfo("C9L6", " ", 26, 9, 6)
-
- -- spm_SetDestructionEffectName(class, materialEnum, effectName)
- -- class: 0 == club, 1 == small, 2 == large, 3 == heavy
- --spm_SetDestructionEffectName(0, -1, "hulk_knockdownground_fx_grp")
- spm_SetDestructionEffectName(0, -1, "breakable_sml_lrg_grp")
- spm_SetDestructionEffectName(1, -1, "breakable_cyangrp")
- spm_SetDestructionEffectName(2, -1, "breakable_cyangrp")
- spm_SetDestructionEffectName(3, -1, "breakable_cyangrp")
-
- function LibC3L3Cam(dist)
- hulkPosition = am_GetActorPosition("hulk");
- cm_SetScriptCamStaticV( 60, 90, hulkPosition, dist );
- cm_SwitchToScriptCamera(false,false,false);
- cm_SetScriptCamShot( 90, 1000, true );
- end
-
- function LibC3L3Cam(dist)
- hulkPosition = am_GetActorPosition("hulk");
- cm_SetScriptCamStaticV( 60, 90, hulkPosition, dist );
- cm_SwitchToScriptCamera(false,false,false);
- cm_SetScriptCamShot( 90, 1000, true );
- end
-
-
- function LibTestGen(number, template, localNameprefix)
-
- if(number>0) then
-
- for dude = 1,number do
-
- locatorIndex = mod(dude, 3) + 1
- local locator = localNameprefix .. "_g" .. locatorIndex
- local name = "dudeTest" .. dude
-
- am_CreateActor( template, locator, "C1L3R3", "none", false, name );
-
- print(name, ' at ',locatorIndex)
- end
- end
- end
-
- function LibDogs(dogs)
- LibTestGen(dogs, "gamma_dog", "C1L3R3_eg_u3")
- end
-
- function LibRob(robs)
- LibTestGen(robs, "leader_bot", "C1L3R3_eg_u3")
- end
-
- function LibGamma(gamma)
- LibTestGen(gamma, "gamma_guard", "C1L3R3_eg_u3")
- end
-
- function LibRobC1(robs)
- LibTestGen(robs, "leader_bot", "C3L2RX_Lib")
- end
-
- -- COUNT TEMPLATE --------------------------------------------
-
- function count_template ( template )
-
- count = 0
- for i = 0, (am_GetEnemyCount()-1) do
- name = am_GetEnemyName( i )
- if am_IsActorUsingTemplate( name, template ) then
- count = count + 1
- end
- end
-
- return count
-
- end
-
- --- GET NAME BASED ON TEMPLATE CALLS -------------------
-
- function soldiername ()
-
- local soldierlist = {}
- local soldiernumbers = 0
-
- for i = 0, (am_GetEnemyCount()-1) do
- name = am_GetEnemyName( i )
- if am_IsActorUsingTemplate (name, "assaulter") or
- am_IsActorUsingTemplate (name, "shocktroop") or
- am_IsActorUsingTemplate (name, "missilesoldier") or
- am_IsActorUsingTemplate (name, "shockshielder") or
- am_IsActorUsingTemplate (name, "unarmedsoldier")
- then
- soldiernumbers = soldiernumbers + 1
- soldierlist[soldiernumbers] = name
- end
- end
-
- if soldiernumbers == 0 then
- return ""
- else
- pickone = random (1,soldiernumbers)
- return soldierlist[pickone]
- end
-
- end
-
- function alphaname ()
-
- local soldierlist = {}
- local soldiernumbers = 0
-
- for i = 0, (am_GetEnemyCount()-1) do
- name = am_GetEnemyName( i )
- if am_IsActorUsingTemplate (name, "alpha_guard") or
- am_IsActorUsingTemplate (name, "alpha_shocktroop") or
- am_IsActorUsingTemplate (name, "alpha_missilesoldier") or
- am_IsActorUsingTemplate (name, "alpha_shockshielder")
- then
- soldiernumbers = soldiernumbers + 1
- soldierlist[soldiernumbers] = name
- end
- end
-
- if soldiernumbers == 0 then
- return ""
- else
- pickone = random (1,soldiernumbers)
- return soldierlist[pickone]
- end
-
- end
-
- function gammaname ()
-
- local soldierlist = {}
- local soldiernumbers = 0
-
- for i = 0, (am_GetEnemyCount()-1) do
- name = am_GetEnemyName( i )
- if am_IsActorUsingTemplate (name, "gamma_guard") or
- am_IsActorUsingTemplate (name, "gamma_elite")
- then
- soldiernumbers = soldiernumbers + 1
- soldierlist[soldiernumbers] = name
- end
- end
-
- if soldiernumbers == 0 then
- return ""
- else
- pickone = random (1,soldiernumbers)
- return soldierlist[pickone]
- end
-
- end
-
- function shieldername ()
-
- local soldierlist = {}
- local soldiernumbers = 0
-
- for i = 0, (am_GetEnemyCount()-1) do
- name = am_GetEnemyName( i )
- if am_IsActorUsingTemplate (name, "shockshielder") or
- am_IsActorUsingTemplate (name, "alpha_shockshielder")
- then
- soldiernumbers = soldiernumbers + 1
- soldierlist[soldiernumbers] = name
- end
- end
-
- if soldiernumbers == 0 then
- return ""
- else
- pickone = random (1,soldiernumbers)
- return soldierlist[pickone]
- end
-
- end
-
- --------------- DIALOGUE CALLS ---------------------------------
-
- function dia_shockshielder ( name )
- return
- end
-
- function dia_soldier_gettingbackup ( name )
- return
- end
-
- function dia_soldier_needbackup( name )
- return
- end
-
- function dia_soldier_spawn ( name )
-
- if random(1,4) == 1 then
- debug ("[DIA] 1 in 4 .. no comment")
- return
- end
-
- local pickone = random(1,62)
-
- if pickone == 1 then
- dialogue = "SolHulkCh1_031"
- elseif pickone == 2 then
- dialogue = "SolHulkCh1_036"
- elseif pickone == 3 then
- dialogue = "SolHulkCh1_061"
- elseif pickone == 4 then
- dialogue = "SolHulkCh1_062"
- elseif pickone == 5 then
- dialogue = "SolHulkCh1_063"
- elseif pickone == 6 then
- dialogue = "SolHulkCh1_064"
- elseif pickone == 7 then
- dialogue = "SolHulkCh1_065"
- elseif pickone == 8 then
- dialogue = "SolHulkCh1_089"
- elseif pickone == 9 then
- dialogue = "SolSolCh1_010"
- elseif pickone == 10 then
- dialogue = "SolSolCh1_011"
- elseif pickone == 11 then
- dialogue = "SolSolCh1_012"
- elseif pickone == 12 then
- dialogue = "SolSolCh1_013"
- elseif pickone == 13 then
- dialogue = "SolSolCh1_014"
- elseif pickone == 14 then
- dialogue = "SolSolCh1_015"
- elseif pickone == 15 then
- dialogue = "SolSolCh1_019"
- elseif pickone == 16 then
- dialogue = "SolSolCh1_020"
- elseif pickone == 17 then
- dialogue = "SolSolCh1_021"
- elseif pickone == 18 then
- dialogue = "SolSolCh1_025"
- elseif pickone == 19 then
- dialogue = "SolSolCh1_026"
- elseif pickone == 20 then
- dialogue = "SolSolCh1_027"
- elseif pickone == 21 then
- dialogue = "SolSolCh1_028"
- elseif pickone == 22 then
- dialogue = "SolSolCh1_030"
- elseif pickone == 23 then
- dialogue = "SolHulkCh3_004"
- elseif pickone == 24 then
- dialogue = "SolHulkCh3_049"
- elseif pickone == 25 then
- dialogue = "SolHulkCh3_050"
- elseif pickone == 26 then
- dialogue = "SolHulkCh3_061"
- elseif pickone == 27 then
- dialogue = "SolHulkCh3_062"
- elseif pickone == 28 then
- dialogue = "SolHulkCh3_063"
- elseif pickone == 29 then
- dialogue = "SolHulkCh3_064"
- elseif pickone == 30 then
- dialogue = "SolHulkCh3_065"
- elseif pickone == 31 then
- dialogue = "SolHulkCh3_090"
- elseif pickone == 32 then
- dialogue = "SolHulkCh3_091"
- elseif pickone == 33 then
- dialogue = "SolHulkCh3_092"
- elseif pickone == 34 then
- dialogue = "SolHulkCh3_056"
- elseif pickone == 35 then
- dialogue = "SolHulkCh3_050"
- elseif pickone == 36 then
- dialogue = "SolHulkCh3_004"
- elseif pickone == 37 then
- dialogue = "SolHulkCh3_001"
- elseif pickone == 38 then
- dialogue = "SolHulkCh3_082"
- elseif pickone == 39 then
- dialogue = "SolHulkCh3_083"
- elseif pickone == 40 then
- dialogue = "SolHulkCh3_092"
- elseif pickone == 41 then
- dialogue = "SolHulkCh3_095"
- elseif pickone == 42 then
- dialogue = "SolSolCh3_010"
- elseif pickone == 43 then
- dialogue = "SolSolCh3_011"
- elseif pickone == 44 then
- dialogue = "SolSolCh3_013"
- elseif pickone == 45 then
- dialogue = "SolSolCh3_014"
- elseif pickone == 46 then
- dialogue = "SolSolCh3_015"
- elseif pickone == 47 then
- dialogue = "SolSolCh3_016"
- elseif pickone == 48 then
- dialogue = "SolSolCh3_019"
- elseif pickone == 49 then
- dialogue = "SolSolCh3_020"
- elseif pickone == 50 then
- dialogue = "SolSolCh3_021"
- elseif pickone == 51 then
- dialogue = "SolSolCh3_025"
- elseif pickone == 52 then
- dialogue = "SolSolCh3_026"
- elseif pickone == 53 then
- dialogue = "SolSolCh3_033"
- elseif pickone == 54 then
- dialogue = "SolSolCh3_037"
- elseif pickone == 55 then
- dialogue = "SolSolCh3_039"
- elseif pickone == 56 then
- dialogue = "SolSolCh3_039"
- elseif pickone == 57 then
- dialogue = "SolSolCh3_056"
- elseif pickone == 58 then
- dialogue = "SolSolCh3_057"
- elseif pickone == 59 then
- dialogue = "SolSolCh3_067"
- elseif pickone == 60 then
- dialogue = "SolSolCh3_068"
- elseif pickone == 61 then
- dialogue = "SolSolCh3_069"
- elseif pickone == 62 then
- dialogue = "SolBanCh1_149"
- end
-
- snd_PlayActorDialogue ( dialogue, name )
- debug ("[DIA]Spawn: " .. name .. " " .. dialogue)
-
- end
-
- function dia_alpha_needbackup( name )
- return
- end
-
- function dia_alpha_gettingbackup( name )
- return
- end
-
- function dia_alpha_spawn( name )
-
- if random(1,4) == 1 then
- debug ("[DIA] 1 in 4 .. no comment")
- return
- end
-
- local pickone = random(1,24)
-
- if pickone == 1 then
- dialogue = "AlphBanCh2_35"
- elseif pickone == 2 then
- dialogue = "AlphBanCh2_36"
- elseif pickone == 3 then
- dialogue = "AlphBanCh2_63"
- elseif pickone == 4 then
- dialogue = "AlphBanCh4_01"
- elseif pickone == 5 then
- dialogue = "AlphBanCh4_02"
- elseif pickone == 6 then
- dialogue = "AlphHulkCh2_001"
- elseif pickone == 7 then
- dialogue = "AlphHulkCh2_002"
- elseif pickone == 8 then
- dialogue = "AlphHulkCh2_003"
- elseif pickone == 9 then
- dialogue = "AlphHulkCh2_004"
- elseif pickone == 10 then
- dialogue = "AlphHulkCh2_005"
- elseif pickone == 11 then
- dialogue = "AlphHulkCh2_056"
- elseif pickone == 12 then
- dialogue = "AlphHulkCh2_057"
- elseif pickone == 13 then
- dialogue = "AlphHulkCh2_058"
- elseif pickone == 14 then
- dialogue = "AlphHulkCh2_059"
- elseif pickone == 15 then
- dialogue = "AlphHulkCh2_060"
- elseif pickone == 16 then
- dialogue = "AlphHulkCh2_061"
- elseif pickone == 17 then
- dialogue = "AlphHulkCh2_062"
- elseif pickone == 18 then
- dialogue = "AlphHulkCh2_063"
- elseif pickone == 19 then
- dialogue = "AlphHulkCh2_065"
- elseif pickone == 20 then
- dialogue = "AlphHulkCh2_072"
- elseif pickone == 21 then
- dialogue = "AlphHulkCh2_075"
- elseif pickone == 22 then
- dialogue = "AlphHulkCh2_090"
- elseif pickone == 23 then
- dialogue = "AlphHulkCh4_001"
- elseif pickone == 24 then
- dialogue = "AlphHulkCh4_002"
- end
-
- snd_PlayActorDialogue ( dialogue, name )
- debug ("[DIA]Alpha Spawn " .. dialogue .. " " .. name)
-
- end
-
- function dia_gamma_spawn( name )
-
- if random(1,4) == 1 then
- debug ("[DIA] 1 in 4 .. no comment")
- return
- end
-
- local pickone = random(1,59)
-
- if pickone == 1 then
- dialogue = "GamHulkCh4_01"
- elseif pickone == 2 then
- dialogue = "GamHulkCh4_03"
- elseif pickone == 3 then
- dialogue = "GamHulkCh4_31"
- elseif pickone == 4 then
- dialogue = "GamHulkCh4_32"
- elseif pickone == 5 then
- dialogue = "GamHulkCh4_33"
- elseif pickone == 6 then
- dialogue = "GamHulkCh4_40"
- elseif pickone == 7 then
- dialogue = "GamBanCh4_37"
- elseif pickone == 8 then
- dialogue = "GamBanCh4_38"
- elseif pickone == 9 then
- dialogue = "GamBanCh4_39"
- elseif pickone == 10 then
- dialogue = "GamBanCh4_40"
- elseif pickone == 11 then
- dialogue = "GamBanCh4_41"
- elseif pickone == 12 then
- dialogue = "GamBanCh4_43"
- elseif pickone == 13 then
- dialogue = "GamBanCh4_44"
- elseif pickone == 14 then
- dialogue = "GamBanCh4_45"
- elseif pickone == 15 then
- dialogue = "GamBanCh4_47"
- elseif pickone == 16 then
- dialogue = "GamBanCh4_02"
- elseif pickone == 17 then
- dialogue = "GamBanCh4_03"
- elseif pickone == 18 then
- dialogue = "GamBanCh4_04"
- elseif pickone == 19 then
- dialogue = "GamBanCh4_14"
- elseif pickone == 20 then
- dialogue = "GamBanCh4_15"
- elseif pickone == 21 then
- dialogue = "GamBanCh4_23"
- elseif pickone == 22 then
- dialogue = "GamBanCh4_29"
- elseif pickone == 23 then
- dialogue = "GamBanCh4_31"
- elseif pickone == 24 then
- dialogue = "GamBanCh4_32"
- elseif pickone == 25 then
- dialogue = "GamBanCh4_33"
- elseif pickone == 26 then
- dialogue = "GamBanCh4_49"
- elseif pickone == 27 then
- dialogue = "GamBanCh4_50"
- elseif pickone == 28 then
- dialogue = "GamBanCh4_51"
- elseif pickone == 29 then
- dialogue = "GamBanCh4_54"
- elseif pickone == 30 then
- dialogue = "GamBanCh4_55"
- elseif pickone == 31 then
- dialogue = "GamBanCh4_59"
- elseif pickone == 32 then
- dialogue = "GamElBan_01"
- elseif pickone == 33 then
- dialogue = "GamElBan_02"
- elseif pickone == 34 then
- dialogue = "GamElBan_03"
- elseif pickone == 35 then
- dialogue = "GamElBan_26"
- elseif pickone == 36 then
- dialogue = "GamElBan_22"
- elseif pickone == 37 then
- dialogue = "GamElBan_2"
- elseif pickone == 38 then
- dialogue = "GamElBan_28"
- elseif pickone == 39 then
- dialogue = "GamElBan_37"
- elseif pickone == 40 then
- dialogue = "GamElBan_38"
- elseif pickone == 41 then
- dialogue = "GamElBan_39"
- elseif pickone == 42 then
- dialogue = "GamElBan_40"
- elseif pickone == 43 then
- dialogue = "GamElBan_41"
- elseif pickone == 44 then
- dialogue = "GamElBan_42"
- elseif pickone == 45 then
- dialogue = "GamElBan_4"
- elseif pickone == 46 then
- dialogue = "GamElBan_44"
- elseif pickone == 47 then
- dialogue = "GamElBan_45"
- elseif pickone == 48 then
- dialogue = "GamElBan_55"
- elseif pickone == 49 then
- dialogue = "GamElBan_56"
- elseif pickone == 50 then
- dialogue = "GamElBan_57"
- elseif pickone == 51 then
- dialogue = "GamElBan_58"
- elseif pickone == 52 then
- dialogue = "GamElBan_59"
- elseif pickone == 53 then
- dialogue = "GamElHulk_01"
- elseif pickone == 54 then
- dialogue = "GamElHulk_02"
- elseif pickone == 55 then
- dialogue = "GamElHulk_03"
- elseif pickone == 56 then
- dialogue = "GamElHulk_21"
- elseif pickone == 57 then
- dialogue = "GamElHulk_31"
- elseif pickone == 58 then
- dialogue = "GamElHulk_32"
- elseif pickone == 59 then
- dialogue = "GamElHulk_33"
- end
-
- snd_PlayActorDialogue ( dialogue, name )
- debug ("[DIA]Alpha Spawn " .. dialogue .. " " .. name)
-
- end
-
- function dia_gamma_needbackup ( name )
- return
- end
-
- function dia_gamma_gettingbackup( name )
- return
- end
-
- ---------- soak globals to affect behaviors
- soak_kill_C0L1 = 1
- soak_kill_C1L1 = 1
- soak_kill_C1L2 = 1
- soak_kill_C1L3 = 1
- soak_kill_C1L4 = 1
- soak_kill_C1L5 = 1
- soak_kill_C2L1 = 1
- soak_kill_C2L2 = 1
- soak_kill_C2L4 = 1
- soak_kill_C2L5 = 1
- soak_kill_C3L1 = 1
- soak_kill_C3L2 = 1
- soak_kill_C3L3 = 1
- soak_kill_C3L4 = 1
- soak_kill_C4L1 = 1
- soak_kill_C4L2 = 1
- soak_kill_C4L3 = 1
- soak_kill_C4L4 = 1
- soak_kill_C5L1 = 1
- soak_kill_C5L2 = 1
- soak_kill_C5L3 = 1
- soak_kill_C5L4 = 1
- soak_kill_C9L1 = 1
- soak_kill_C9L2 = 1
- soak_kill_C9L3 = 1
- soak_kill_C9L5 = 1
- soak_kill_C9L6 = 1
-
-
- C0L1_timer = 10
- C1L1_timer = 5
- C1L2_timer = 5
- C1L3_timer = 5
- C1L4_timer = 5
- C1L5_timer = 10
- C2L1_timer = 5
- C2L2_timer = 5
- C2L4_timer = 5
- C2L5_timer = 10
- C3L1_timer = 5
- C3L2_timer = 5
- C3L3_timer = 5
- C3L4_timer = 10
- C4L1_timer = 5
- C4L2_timer = 5
- C4L3_timer = 5
- C4L4_timer = 10
- C5L1_timer = 5
- C5L2_timer = 5
- C5L3_timer = 5
- C5L4_timer = 5
- C9L1_timer = 10
- C9L2_timer = 10
- C9L3_timer = 10
- C9L5_timer = 10
- C9L6_timer = 10
-
- C2L2_loop = 0
- C2L4_loop = 0
- C3L2_loop = 0
- C4L2_loop = 0
-
-
- function moveActorToVolume( actor, volume )
- volExists = tvm_DoesVolumeExist( volume )
- write ("<SOAK> MoveActorToVol"..volume.."\n")
- if volExists ~= nil then
- v = tvm_GetVolumePosition( volume )
- am_SetActorPosition( actor, v )
- cm_ResetGameCamera()
- am_SetCharacterHealth( "hulk", 900 )
- else
- write ("Unable to locate volume " .. volume .. "\n")
- end
- end
- function moveActorToLoc( actor, x,y,z )
- write ("<SOAK> MoveActorToLoc\n")
- v = tvm_GetVolumePosition( "" ) -- create vector
- v.x = x
- v.y = y
- v.z = z
- am_SetActorPosition( actor, v )
- cm_ResetGameCamera()
- am_SetActorOrientation("hulk",random(360))
- am_SetCharacterHealth( "hulk", 900 )
- end
- -- Valid level list
- AddValidLevel("C0L1");
-