require("Minigame/TR/Scripts/TRR_TrackSetup.lua") -- CONSTANTS ---------------------------------------------------------------------------------------------------------------------------------- local leftGLCarExhaustOffset = { 38, 18, -170 } local rightGLCarExhaustOffset = { -35, 18, -170 } local leftSCCarExhaustOffset = { 28, 22, -170 } local rightSCCarExhaustOffset = { -28, 22, -170 } local leftCarWheelOffset = { 41.7, 0, 0} local rightCarWheelOffset = { -41.7, 0, 0} -- B U N D L E S ------------------------------------------------------------------------------------------------------------------------------ FabBundle.Setup{ name = "EnvironmentFab", assetPath = "Minigame/TR/TR.fab" } -- L I G H T G R O U P S --------------------------------------------------------------------------------------------------------------------- LightGroup.Setup{ name = "IntroLightGroup", assetName = "LightGroup1" } -- Intro LightGroup.Setup{ name = "MidwayLightGroup", assetName = "LightGroup2" } -- Midway LightGroup.Setup{ name = "OutroLightGroup", assetName = "LightGroup3" } -- Outro LightGroup.Setup{ name = "DefaultLightGroup", assetName = "LightGroup4" } -- Gameplay -- ASSETS-------------------------------------------------------------------------------------------------------------------------------------- --SoundBanks SoundBank.Setup{ name = "TrackSoundBank", path = "SFX/ThunderRoad_SFX.bnk" } --AnimTriggers AnimTrigger.Setup{ name = "SoundAnimTrigger1", animationCmp = "P1_Car_TurnLeft", frame = 0, script = "SoundScript1" } AnimTrigger.Setup{ name = "SoundAnimTrigger2", animationCmp = "P1_Car_TurnRight", frame = 0, script = "SoundScript1" } AnimTrigger.Setup{ name = "SoundAnimTrigger3", animationCmp = "P1_Car_BargeReactionL", frame = 0, script = "SoundScript2" } AnimTrigger.Setup{ name = "SoundAnimTrigger4", animationCmp = "P1_Car_BargeReactionR", frame = 0, script = "SoundScript2" } AnimTrigger.Setup{ name = "SoundAnimTrigger5", animationCmp = "P2_Car_BargeReactionL", frame = 0, script = "SoundScript5" } AnimTrigger.Setup{ name = "SoundAnimTrigger6", animationCmp = "P2_Car_BargeReactionR", frame = 0, script = "SoundScript5" } AnimTrigger.Setup{ name = "SoundAnimTrigger7", animationCmp = "P1_Car_ShuntReaction", frame = 0, script = "SoundScript3" } AnimTrigger.Setup{ name = "SoundAnimTrigger8", animationCmp = "P2_Car_ShuntReaction", frame = 0, script = "SoundScript6" } AnimTrigger.Setup{ name = "SoundAnimTrigger9", animationCmp = "P2_Car_TurnLeft", frame = 0, script = "SoundScript4" } AnimTrigger.Setup{ name = "SoundAnimTrigger10", animationCmp = "P2_Car_TurnRight", frame = 0, script = "SoundScript4" } AnimTrigger.Setup{ name = "SoundAnimTrigger11", animationCmp = "P1_Car_ComeOffLeftBank", frame = 0, script = "SoundScript7" } AnimTrigger.Setup{ name = "SoundAnimTrigger12", animationCmp = "P1_Car_ComeOffRightBank", frame = 0, script = "SoundScript7" } AnimTrigger.Setup{ name = "SoundAnimTrigger13", animationCmp = "P1_Car_ComeOnLeftBank", frame = 0, script = "SoundScript7" } AnimTrigger.Setup{ name = "SoundAnimTrigger14", animationCmp = "P1_Car_ComeOnRightBank", frame = 0, script = "SoundScript7" } AnimTrigger.Setup{ name = "SoundAnimTrigger15", animationCmp = "P2_Car_ComeOffLeftBank", frame = 0, script = "SoundScript8" } AnimTrigger.Setup{ name = "SoundAnimTrigger16", animationCmp = "P2_Car_ComeOffRightBank", frame = 0, script = "SoundScript8" } AnimTrigger.Setup{ name = "SoundAnimTrigger17", animationCmp = "P2_Car_ComeOnLeftBank", frame = 0, script = "SoundScript8" } AnimTrigger.Setup{ name = "SoundAnimTrigger18", animationCmp = "P2_Car_ComeOnRightBank", frame = 0, script = "SoundScript8" } -- Post processing --Dof.Setup{ name = "DofCmp", assetName = "DOF", dist = "2260.0", range = "9080", blur = "0.75" } -------------------------- -- TRACK SETUP -------------------------- -- Track Sections and their Obstacles local initialSectionPosition = 5000.0 startZ = 0.0 halfwayZ = 100000.0 endZ = 0.0 Model.Setup { name = "BridgeSegmentStart", assetName = "e04_bridgeSegment_01", } Model.Setup { name = "BridgeSegmentMidway", assetName = "e04_bridgeSegment_03", } Model.Setup { name = "CutsceneEnvironment1", assetName = "e04_environment50mSegment_01", } Model.Setup { name = "CutsceneEnvironment2", assetName = "e04_environmentSegment_02", pos = { 0.0, 0.0, -15000 } } local sectionPosition = initialSectionPosition local trackIdx for trackIdx = 1, table.getn(ThunderRoadRace.TrackSectionList) do -- Setup Track Segment local sectionName = "TrackSection" .. trackIdx local segmentId = ThunderRoadRace.TrackSectionList[trackIdx].segmentId -- Track Section Model.Setup { name = sectionName, assetName = Track.SegmentList[segmentId].assetName, pos = { 0.0, 0.0, sectionPosition } } -- Is Player Start Segment if ThunderRoadRace.TrackSectionList[trackIdx].isStartPoint == true then -- Start Line Model.Setup { name = "startLine", assetName = "e04_startLine", pos = { 0.0, 129.0, sectionPosition } } startZ = sectionPosition end if ThunderRoadRace.TrackSectionList[trackIdx].isHalfwayPoint == true then -- Midway Line Model.Setup { name = "midLine", assetName = "e04_midLine", pos = { 0.0, 129.0, sectionPosition } } halfwayZ = sectionPosition end if ThunderRoadRace.TrackSectionList[trackIdx].isEndPoint == true then endZ = sectionPosition end -- Setup Track Segment Obstacles local obstacleIdx for obstacleIdx = 1, table.getn(ThunderRoadRace.TrackSectionList[trackIdx].ObstacleList) do local obstacleName = sectionName .. "_Obstacle" .. obstacleIdx local obstacle = ThunderRoadRace.TrackSectionList[trackIdx].ObstacleList[obstacleIdx] local kObstacleData = ObstacleList[obstacle.obstacleId] -- Make sure we're within the track limits assert( obstacle.z >= 0 and obstacle.z <= Track.SegmentList[segmentId].length, "Obstacle cannot be positioned outside of track segment. It is currently at" .. obstacle.z .. "cm, but the track is of length " .. Track.SegmentList[segmentId].length .. "cm" ) -- Obstacle for Track Section Model.Setup { name = obstacleName, assetName = kObstacleData.assetName, pos = { Track.laneOffsets[obstacle.laneIdx], 0.1, obstacle.z + sectionPosition }, isUnique=true, } -- Create Animation if it has one if not ( ( kObstacleData.onImpactAnimationName == nil ) or ( kObstacleData.onImpactAnimationName == "" ) ) then Animation.Setup { name = obstacleName .. "_Impact", modelCmp = obstacleName, assetName = kObstacleData.onImpactAnimationName, } end end -- Increment next track start position by length of current sectionPosition = sectionPosition + Track.SegmentList[segmentId].length - 1 end ParticleEffect.Setup{ name = "Impact_Wood", effectName = "WoodHit", breffPath = "Minigame/ThunderRoadRace/TR_DebriImpact.breff", breftPath = "Minigame/ThunderRoadRace/TR_DebriImpact.breft" } ParticleEffect.Setup{ name = "Impact_Garbage", effectName = "TrashHit", breffPath = "Minigame/ThunderRoadRace/TR_DebriImpact.breff", breftPath = "Minigame/ThunderRoadRace/TR_DebriImpact.breft" } ParticleEffect.Setup{ name = "Impact_Oil", effectName = "Oil_Spray", breffPath = "Minigame/ThunderRoadRace/TR_WaterDriveSpray.breff", breftPath = "Minigame/ThunderRoadRace/TR_WaterDriveSpray.breft" } ParticleEffect.Setup{ name = "Impact_Puddle", effectName = "Puddle_Spray", breffPath = "Minigame/ThunderRoadRace/TR_WaterDriveSpray.breff", breftPath = "Minigame/ThunderRoadRace/TR_WaterDriveSpray.breft" } -------------------------- -- ENVIRONMENT -------------------------- --Environment Features Model.Setup{ name = "EndJump", assetName = "e04_waterSection_02" } Model.Setup{ name = "IntroTrack", assetName = "e04_track50mSegment_Cutscene" } Model.Setup{ name = "MidroundTrack", assetName = "e04_track50mSegment_Cutscene" } -- Auto-Generate Environment from list local sectionPosition = initialSectionPosition for i = 1, table.getn(ThunderRoadRace.EnvironmentSectionList) do -- Setup Environment Segment local sectionName = "EnvSection" .. i local segmentId = ThunderRoadRace.EnvironmentSectionList[i] -- Environment Section Model.Setup { name = sectionName, assetName = Environment.SegmentList[segmentId].assetName, pos = { 0.0, 0.0, sectionPosition } } -- Increment next environment start position by length of current sectionPosition = sectionPosition + Environment.SegmentList[segmentId].length end -- Sky local skydomeScale = ( MiniGame.farPlane / 250000 ) * 0.9 Model.Setup { name = "SkyDome", assetName = "e04_skydome", scale = { skydomeScale, skydomeScale, skydomeScale } } --Trains Model.Setup { name = "Train01", assetName = "e04_train_01" } Model.Setup { name = "Train02", assetName = "e04_train_02" } Model.Setup { name = "Train03", assetName = "e04_train_03" } Model.Setup { name = "Train04", assetName = "e04_train_04" } Animation.Setup{ name = "Train_01", modelCmp="Train01", assetName = "e04_Train_01" } Animation.Setup{ name = "Train_02", modelCmp="Train02", assetName = "e04_Train_02" } Animation.Setup{ name = "Train_03", modelCmp="Train03", assetName = "e04_Train_03" } Animation.Setup{ name = "Train_04", modelCmp="Train04", assetName = "e04_Train_04" } -------------------------- -- CHARACTERS -------------------------- -- Cha Cha Model.Setup{ name = "ChaCha", assetName = "TR_ChaCha", pos = { 0.0, 4.0, -160.0 }, hasShapeAnim=true } Animation.Setup{ name = "ChaCha_Intro", modelCmp="ChaCha", assetName = "TR_ChaCha_Intro", isSkeletal=true } -- Gear Layout LYTLayout.Setup { name = "TeamGears", archiveName = "OSD/TR_speedMeter.arc", layoutName = "TR_speedMeter.brlyt", additionalFonts = "GlobalFontPack", } -- Team 1 -- Car Model.Setup { name = "Car_P1", assetName = "TR_GreaseLightning", blendAnims = true, blendDuration = 0.2, hasShapeAnim=true } Model.Setup { name = "Char_P1", assetName = "TR_Danny", blendAnims = true, blendDuration = 0.2, hasShapeAnim=true, rawSkeletonData=true } Animation.Setup{ name = "P1_Car_Idle", modelCmp="Car_P1", assetName = "TR_GL_Idle" } Animation.Setup{ name = "P1_Car_BargeL", modelCmp="Car_P1", assetName = "TR_GL_BargeL" } Animation.Setup{ name = "P1_Car_BargeR", modelCmp="Car_P1", assetName = "TR_GL_BargeR" } Animation.Setup{ name = "P1_Car_BargeReactionL", modelCmp="Car_P1", assetName = "TR_GL_BargeReactionL" } Animation.Setup{ name = "P1_Car_BargeReactionR", modelCmp="Car_P1", assetName = "TR_GL_BargeReactionR" } Animation.Setup{ name = "P1_Car_ShuntReaction", modelCmp="Car_P1", assetName = "TR_GL_ShuntReaction" } Animation.Setup{ name = "P1_Car_Braking_Lev1", modelCmp="Car_P1", assetName = "TR_GL_BrakingL1" } Animation.Setup{ name = "P1_Car_Driving", modelCmp="Car_P1", assetName = "TR_GL_Driving" } Animation.Setup{ name = "P1_Car_ComeOffLeftBank", modelCmp="Car_P1", assetName = "TR_GL_OffOfLeftBank" } Animation.Setup{ name = "P1_Car_ComeOffRightBank", modelCmp="Car_P1", assetName = "TR_GL_OffOfRightBank" } Animation.Setup{ name = "P1_Car_ComeOnLeftBank", modelCmp="Car_P1", assetName = "TR_GL_OnToLeftBank" } Animation.Setup{ name = "P1_Car_ComeOnRightBank", modelCmp="Car_P1", assetName = "TR_GL_OnToRightBank" } Animation.Setup{ name = "P1_Car_OutOfLeft", modelCmp="Car_P1", assetName = "TR_GL_OutOfLeft" } Animation.Setup{ name = "P1_Car_OutOfRight", modelCmp="Car_P1", assetName = "TR_GL_OutOfRight" } Animation.Setup{ name = "P1_Car_TurnLeft", modelCmp="Car_P1", assetName = "TR_GL_TurnLeft" } Animation.Setup{ name = "P1_Car_TurnRight", modelCmp="Car_P1", assetName = "TR_GL_TurnRight" } Animation.Setup{ name = "P1_Car_Intro", modelCmp="Car_P1", assetName = "TR_GL_Intro" } Animation.Setup{ name = "P1_Car_MidWay_Win", modelCmp="Car_P1", assetName = "TR_GL_WinMidway" } Animation.Setup{ name = "P1_Car_MidWay_Lose", modelCmp="Car_P1", assetName = "TR_GL_LoseMidway" } Animation.Setup{ name = "P1_Car_Outro_Win", modelCmp="Car_P1", assetName = "TR_GL_WinOutro" } Animation.Setup{ name = "P1_Car_Outro_Lose", modelCmp="Car_P1", assetName = "TR_GL_LoseOutro" } Animation.Setup{ name = "P1_Char_Idle", modelCmp="Char_P1", assetName = "TR_Danny_Idle", isSkeletal=true } Animation.Setup{ name = "P1_Char_BargeL", modelCmp="Char_P1", assetName = "TR_Danny_BargeL", isSkeletal=true } Animation.Setup{ name = "P1_Char_BargeR", modelCmp="Char_P1", assetName = "TR_Danny_BargeR", isSkeletal=true } Animation.Setup{ name = "P1_Char_BargeReactionL", modelCmp="Char_P1", assetName = "TR_Danny_BargeReactionL", isSkeletal=true } Animation.Setup{ name = "P1_Char_BargeReactionR", modelCmp="Char_P1", assetName = "TR_Danny_BargeReactionR", isSkeletal=true } Animation.Setup{ name = "P1_Char_ShuntReaction", modelCmp="Char_P1", assetName = "TR_Danny_ShuntReaction", isSkeletal=true } Animation.Setup{ name = "P1_Char_Braking_Lev1", modelCmp="Char_P1", assetName = "TR_Danny_BrakingL1", isSkeletal=true } Animation.Setup{ name = "P1_Char_Driving", modelCmp="Char_P1", assetName = "TR_Danny_Driving", isSkeletal=true } Animation.Setup{ name = "P1_Char_ComeOffLeftBank", modelCmp="Char_P1", assetName = "TR_Danny_OffOfLeftBank", isSkeletal=true } Animation.Setup{ name = "P1_Char_ComeOffRightBank", modelCmp="Char_P1", assetName = "TR_Danny_OffOfRightBank", isSkeletal=true } Animation.Setup{ name = "P1_Char_ComeOnLeftBank", modelCmp="Char_P1", assetName = "TR_Danny_OnToLeftBank", isSkeletal=true } Animation.Setup{ name = "P1_Char_ComeOnRightBank", modelCmp="Char_P1", assetName = "TR_Danny_OnToRightBank", isSkeletal=true } Animation.Setup{ name = "P1_Char_OutOfLeft", modelCmp="Char_P1", assetName = "TR_Danny_OutOfLeft", isSkeletal=true } Animation.Setup{ name = "P1_Char_OutOfRight", modelCmp="Char_P1", assetName = "TR_Danny_OutOfRight", isSkeletal=true } Animation.Setup{ name = "P1_Char_TurnLeft", modelCmp="Char_P1", assetName = "TR_Danny_TurnLeft", isSkeletal=true } Animation.Setup{ name = "P1_Char_TurnRight", modelCmp="Char_P1", assetName = "TR_Danny_TurnRight", isSkeletal=true } Animation.Setup{ name = "P1_Char_Intro", modelCmp="Char_P1", assetName = "TR_Danny_Intro", isSkeletal=true } Animation.Setup{ name = "P1_Char_MidWay_Win", modelCmp="Char_P1", assetName = "TR_Danny_WinMidway", isSkeletal=true } Animation.Setup{ name = "P1_Char_MidWay_Lose", modelCmp="Char_P1", assetName = "TR_Danny_LoseMidway", isSkeletal=true } Animation.Setup{ name = "P1_Char_Outro_Win", modelCmp="Char_P1", assetName = "TR_Danny_WinOutro", isSkeletal=true } Animation.Setup{ name = "P1_Char_Outro_Lose", modelCmp="Char_P1", assetName = "TR_Danny_LoseOutro", isSkeletal=true } -- Particles -- ParticleEffect.Setup{ name = "P1_ExhaustFlame", attachToCmp="Car_P1", attachToNodeOnCmp="GLparticleLocator", effectName = "FlameP1", breffPath = "Minigame/ThunderRoadRace/TR_exhaustFlame2_P1.breff", breftPath = "Minigame/ThunderRoadRace/TR_exhaustFlame2_P1.breft", pos = { 0, 18, -170 } } ParticleEffect.Setup{ name = "P1_ExhaustSmoke_Left", attachToCmp="Car_P1", attachToNodeOnCmp="GLparticleLocator", effectName = "ExhaustSmoke", breffPath = "Minigame/ThunderRoadRace/TR_exhaustSmoke.breff", breftPath = "Minigame/ThunderRoadRace/TR_exhaustSmoke.breft", pos=leftGLCarExhaustOffset } ParticleEffect.Setup{ name = "P1_ExhaustSmoke_Right", attachToCmp="Car_P1", attachToNodeOnCmp="GLparticleLocator", effectName = "ExhaustSmoke", breffPath = "Minigame/ThunderRoadRace/TR_exhaustSmoke.breff", breftPath = "Minigame/ThunderRoadRace/TR_exhaustSmoke.breft", pos=rightGLCarExhaustOffset } ParticleEffect.Setup{ name = "P1_Exhaust_Left", attachToCmp="Car_P1", attachToNodeOnCmp="GLparticleLocator", effectName = "ExhaustLeft", breffPath = "Minigame/ThunderRoadRace/TR_VehicleExhaust.breff", breftPath = "Minigame/ThunderRoadRace/TR_VehicleExhaust.breft", pos=leftGLCarExhaustOffset } ParticleEffect.Setup{ name = "P1_Exhaust_Right", attachToCmp="Car_P1", attachToNodeOnCmp="GLparticleLocator", effectName = "ExhaustRight", breffPath = "Minigame/ThunderRoadRace/TR_VehicleExhaust.breff", breftPath = "Minigame/ThunderRoadRace/TR_VehicleExhaust.breft", pos=rightGLCarExhaustOffset } -- ParticleEffect.Setup{ name = "P1_Skid_Left", attachToCmp="Car_P1", attachToNodeOnCmp="GLparticleLocator", effectName = "tyre_skidmark", breffPath = "Minigame/ThunderRoadRace/TR_skidMarks.breff", breftPath = "Minigame/ThunderRoadRace/TR_skidMarks.breft", pos=leftCarWheelOffset } ParticleEffect.Setup{ name = "P1_Skid_Right", attachToCmp="Car_P1", attachToNodeOnCmp="GLparticleLocator", effectName = "tyre_skidmark", breffPath = "Minigame/ThunderRoadRace/TR_skidMarks.breff", breftPath = "Minigame/ThunderRoadRace/TR_skidMarks.breft", pos=rightCarWheelOffset } ParticleEffect.Setup{ name = "P1_Dust", attachToCmp="Car_P1", attachToNodeOnCmp="GLparticleLocator", effectName = "Vehicle_Dust", breffPath = "Minigame/ThunderRoadRace/Vehicle_Dust.breff", breftPath = "Minigame/ThunderRoadRace/Vehicle_Dust.breft" } -- ParticleEffect.Setup{ name = "P1_Impact_Left", attachToCmp="Car_P1", attachToNodeOnCmp="GLparticleLocator", effectName = "G_CarImpact", breffPath = "Minigame/ThunderRoadRace/TR_Greaselightning_CarImpact1.breff", breftPath = "Minigame/ThunderRoadRace/TR_Greaselightning_CarImpact1.breft", pos={75.0, 50, 100} } ParticleEffect.Setup{ name = "P1_Impact_Right", attachToCmp="Car_P1", attachToNodeOnCmp="GLparticleLocator", effectName = "G_CarImpact", breffPath = "Minigame/ThunderRoadRace/TR_Greaselightning_CarImpact1.breff", breftPath = "Minigame/ThunderRoadRace/TR_Greaselightning_CarImpact1.breft", pos={-75.0, 50, 100} } ParticleEffect.Setup{ name = "P1_Spray_Front", attachToCmp="Car_P1", attachToNodeOnCmp="GLparticleLocator", effectName = "Vehicle_FrontSpray", breffPath = "Minigame/ThunderRoadRace/TR_WaterDriveSpray.breff", breftPath = "Minigame/ThunderRoadRace/TR_WaterDriveSpray.breft" } ParticleEffect.Setup{ name = "P1_Spray_Left", attachToCmp="Car_P1", attachToNodeOnCmp="GLparticleLocator", effectName = "Vehicle_SideSprayL", breffPath = "Minigame/ThunderRoadRace/TR_WaterDriveSpray.breff", breftPath = "Minigame/ThunderRoadRace/TR_WaterDriveSpray.breft" } ParticleEffect.Setup{ name = "P1_Spray_Right", attachToCmp="Car_P1", attachToNodeOnCmp="GLparticleLocator", effectName = "Vehicle_SideSprayR", breffPath = "Minigame/ThunderRoadRace/TR_WaterDriveSpray.breff", breftPath = "Minigame/ThunderRoadRace/TR_WaterDriveSpray.breft" } -- Water Wake --[[Model.Setup { name = "T1_Spray_Wake", assetName = "WaterWake", } Animation.Setup{ name = "T1_Spray_Wake_Anim", modelCmp="T1_Spray_Wake", assetName = "WaterWake" }]]-- -- Gears LYTPane.Setup{ name = "T1_GearMeter", paneName = "player1", layoutCmp = "TeamGears" } LYTPane.Setup{ name = "T1_GearFill", paneName = "P1_meterFill", layoutCmp = "TeamGears" } LYTPane.Setup{ name = "T1_GearFillCap", paneName = "P1_meterFillCap", layoutCmp = "TeamGears" } LYTTextPane.Setup{ name = "T1_GearNumber", paneName = "P1_gearNoText_FL", outlinePaneName = "P1_gearNoText_ST", layoutCmp = "TeamGears", maxNumCharacters = 1 } LYTAnimation.Setup { name = "T1_GearMeter_Entry", animName = "TR_speedMeter_P1_meterEntry.brlan", paneCmp = "T1_GearMeter", layoutCmp = "TeamGears", } LYTAnimation.Setup { name = "T1_GearMeter_Exit", animName = "TR_speedMeter_P1_meterExit.brlan", paneCmp = "T1_GearMeter", layoutCmp = "TeamGears", } LYTAnimation.Setup { name = "T1_GearMeter_ChangeGearNow", animName = "TR_speedMeter_P1_changeGearNow.brlan", paneCmp = "T1_GearMeter", layoutCmp = "TeamGears" } LYTAnimation.Setup { name = "T1_GearMeter_GearChanged", animName = "TR_speedMeter_P1_gearChanged.brlan", paneCmp = "T1_GearMeter", layoutCmp = "TeamGears" } -- Team 2 -- Car Model.Setup { name = "Car_P2", assetName = "TR_ScorpionsCar", blendAnims = true, blendDuration = 0.2, hasShapeAnim=true } Model.Setup { name = "Char_P2", assetName = "TR_Leo", blendAnims = true, blendDuration = 0.2, hasShapeAnim=true, rawSkeletonData=true } Animation.Setup{ name = "P2_Car_Idle", modelCmp="Car_P2", assetName = "TR_SC_Idle" } Animation.Setup{ name = "P2_Car_BargeL", modelCmp="Car_P2", assetName = "TR_SC_BargeL" } Animation.Setup{ name = "P2_Car_BargeR", modelCmp="Car_P2", assetName = "TR_SC_BargeR" } Animation.Setup{ name = "P2_Car_BargeReactionL", modelCmp="Car_P2", assetName = "TR_SC_BargeReactionL" } Animation.Setup{ name = "P2_Car_BargeReactionR", modelCmp="Car_P2", assetName = "TR_SC_BargeReactionR" } Animation.Setup{ name = "P2_Car_ShuntReaction", modelCmp="Car_P2", assetName = "TR_SC_ShuntReaction" } Animation.Setup{ name = "P2_Car_Braking_Lev1", modelCmp="Car_P2", assetName = "TR_SC_BrakingL1" } Animation.Setup{ name = "P2_Car_Driving", modelCmp="Car_P2", assetName = "TR_SC_Driving" } Animation.Setup{ name = "P2_Car_ComeOffLeftBank", modelCmp="Car_P2", assetName = "TR_SC_OffOfLeftBank" } Animation.Setup{ name = "P2_Car_ComeOffRightBank", modelCmp="Car_P2", assetName = "TR_SC_OffOfRightBank" } Animation.Setup{ name = "P2_Car_ComeOnLeftBank", modelCmp="Car_P2", assetName = "TR_SC_OnToLeftBank" } Animation.Setup{ name = "P2_Car_ComeOnRightBank", modelCmp="Car_P2", assetName = "TR_SC_OnToRightBank" } Animation.Setup{ name = "P2_Car_OutOfLeft", modelCmp="Car_P2", assetName = "TR_SC_OutOfLeft" } Animation.Setup{ name = "P2_Car_OutOfRight", modelCmp="Car_P2", assetName = "TR_SC_OutOfRight" } Animation.Setup{ name = "P2_Car_TurnLeft", modelCmp="Car_P2", assetName = "TR_SC_TurnLeft" } Animation.Setup{ name = "P2_Car_TurnRight", modelCmp="Car_P2", assetName = "TR_SC_TurnRight" } Animation.Setup{ name = "P2_Car_Intro", modelCmp="Car_P2", assetName = "TR_SC_Intro" } Animation.Setup{ name = "P2_Car_MidWay_Win", modelCmp="Car_P2", assetName = "TR_SC_WinMidway" } Animation.Setup{ name = "P2_Car_MidWay_Lose", modelCmp="Car_P2", assetName = "TR_SC_LoseMidway" } Animation.Setup{ name = "P2_Car_Outro_Win", modelCmp="Car_P2", assetName = "TR_SC_WinOutro" } Animation.Setup{ name = "P2_Car_Outro_Lose", modelCmp="Car_P2", assetName = "TR_SC_LoseOutro" } Animation.Setup{ name = "P2_Char_Idle", modelCmp="Char_P2", assetName = "TR_Leo_Idle", isSkeletal=true } Animation.Setup{ name = "P2_Char_BargeL", modelCmp="Char_P2", assetName = "TR_Leo_BargeL", isSkeletal=true } Animation.Setup{ name = "P2_Char_BargeR", modelCmp="Char_P2", assetName = "TR_Leo_BargeR", isSkeletal=true } Animation.Setup{ name = "P2_Char_BargeReactionL", modelCmp="Char_P2", assetName = "TR_Leo_BargeReactionL", isSkeletal=true } Animation.Setup{ name = "P2_Char_BargeReactionR", modelCmp="Char_P2", assetName = "TR_Leo_BargeReactionR", isSkeletal=true } Animation.Setup{ name = "P2_Char_ShuntReaction", modelCmp="Char_P2", assetName = "TR_Leo_ShuntReaction", isSkeletal=true } Animation.Setup{ name = "P2_Char_Braking_Lev1", modelCmp="Char_P2", assetName = "TR_Leo_BrakingL1", isSkeletal=true } Animation.Setup{ name = "P2_Char_Driving", modelCmp="Char_P2", assetName = "TR_Leo_Driving", isSkeletal=true } Animation.Setup{ name = "P2_Char_ComeOffLeftBank", modelCmp="Char_P2", assetName = "TR_Leo_OffOfLeftBank", isSkeletal=true } Animation.Setup{ name = "P2_Char_ComeOffRightBank", modelCmp="Char_P2", assetName = "TR_Leo_OffOfRightBank", isSkeletal=true } Animation.Setup{ name = "P2_Char_ComeOnLeftBank", modelCmp="Char_P2", assetName = "TR_Leo_OnToLeftBank", isSkeletal=true } Animation.Setup{ name = "P2_Char_ComeOnRightBank", modelCmp="Char_P2", assetName = "TR_Leo_OnToRightBank", isSkeletal=true } Animation.Setup{ name = "P2_Char_OutOfLeft", modelCmp="Char_P2", assetName = "TR_Leo_OutOfLeft", isSkeletal=true } Animation.Setup{ name = "P2_Char_OutOfRight", modelCmp="Char_P2", assetName = "TR_Leo_OutOfRight", isSkeletal=true } Animation.Setup{ name = "P2_Char_TurnLeft", modelCmp="Char_P2", assetName = "TR_Leo_TurnLeft", isSkeletal=true } Animation.Setup{ name = "P2_Char_TurnRight", modelCmp="Char_P2", assetName = "TR_Leo_TurnRight", isSkeletal=true } Animation.Setup{ name = "P2_Char_Intro", modelCmp="Char_P2", assetName = "TR_Leo_Intro", isSkeletal=true } Animation.Setup{ name = "P2_Char_MidWay_Win", modelCmp="Char_P2", assetName = "TR_Leo_WinMidway", isSkeletal=true } Animation.Setup{ name = "P2_Char_MidWay_Lose", modelCmp="Char_P2", assetName = "TR_Leo_LoseMidway", isSkeletal=true } Animation.Setup{ name = "P2_Char_Outro_Win", modelCmp="Char_P2", assetName = "TR_Leo_WinOutro", isSkeletal=true } Animation.Setup{ name = "P2_Char_Outro_Lose", modelCmp="Char_P2", assetName = "TR_Leo_LoseOutro", isSkeletal=true } -- Particles -- ParticleEffect.Setup{ name = "P2_ExhaustFlame", attachToCmp="Car_P2", attachToNodeOnCmp="SCparticleLocator", effectName = "FlameP2", breffPath = "Minigame/ThunderRoadRace/TR_exhaustFlame2_P2.breff", breftPath = "Minigame/ThunderRoadRace/TR_exhaustFlame2_P2.breft", pos = { 0, 22, -170 } } ParticleEffect.Setup{ name = "P2_ExhaustSmoke_Left", attachToCmp="Car_P2", attachToNodeOnCmp="SCparticleLocator", effectName = "ExhaustSmoke", breffPath = "Minigame/ThunderRoadRace/TR_exhaustSmoke.breff", breftPath = "Minigame/ThunderRoadRace/TR_exhaustSmoke.breft", pos=leftSCCarExhaustOffset } ParticleEffect.Setup{ name = "P2_ExhaustSmoke_Right", attachToCmp="Car_P2", attachToNodeOnCmp="SCparticleLocator", effectName = "ExhaustSmoke", breffPath = "Minigame/ThunderRoadRace/TR_exhaustSmoke.breff", breftPath = "Minigame/ThunderRoadRace/TR_exhaustSmoke.breft", pos=rightSCCarExhaustOffset } ParticleEffect.Setup{ name = "P2_Exhaust_Left", attachToCmp="Car_P2", attachToNodeOnCmp="SCparticleLocator", effectName = "ExhaustLeft", breffPath = "Minigame/ThunderRoadRace/TR_VehicleExhaust.breff", breftPath = "Minigame/ThunderRoadRace/TR_VehicleExhaust.breft", pos=leftSCCarExhaustOffset } ParticleEffect.Setup{ name = "P2_Exhaust_Right", attachToCmp="Car_P2", attachToNodeOnCmp="SCparticleLocator", effectName = "ExhaustRight", breffPath = "Minigame/ThunderRoadRace/TR_VehicleExhaust.breff", breftPath = "Minigame/ThunderRoadRace/TR_VehicleExhaust.breft", pos=rightSCCarExhaustOffset } -- ParticleEffect.Setup{ name = "P2_Skid_Left", attachToCmp="Car_P2", attachToNodeOnCmp="SCparticleLocator", effectName = "tyre_skidmark", breffPath = "Minigame/ThunderRoadRace/TR_skidMarks.breff", breftPath = "Minigame/ThunderRoadRace/TR_skidMarks.breft", pos=leftCarWheelOffset } ParticleEffect.Setup{ name = "P2_Skid_Right", attachToCmp="Car_P2", attachToNodeOnCmp="SCparticleLocator", effectName = "tyre_skidmark", breffPath = "Minigame/ThunderRoadRace/TR_skidMarks.breff", breftPath = "Minigame/ThunderRoadRace/TR_skidMarks.breft", pos=rightCarWheelOffset } ParticleEffect.Setup{ name = "P2_Dust", attachToCmp="Car_P2", attachToNodeOnCmp="SCparticleLocator", effectName = "Vehicle_Dust", breffPath = "Minigame/ThunderRoadRace/Vehicle_Dust.breff", breftPath = "Minigame/ThunderRoadRace/Vehicle_Dust.breft" } -- ParticleEffect.Setup{ name = "P2_Impact_Left", attachToCmp="Car_P2", attachToNodeOnCmp="SCparticleLocator", effectName = "S_CarImpact", breffPath = "Minigame/ThunderRoadRace/TR_Scorpion_CarImpact1.breff", breftPath = "Minigame/ThunderRoadRace/TR_Scorpion_CarImpact1.breft", pos={75.0, 50, 100} } ParticleEffect.Setup{ name = "P2_Impact_Right", attachToCmp="Car_P2", attachToNodeOnCmp="SCparticleLocator", effectName = "S_CarImpact", breffPath = "Minigame/ThunderRoadRace/TR_Scorpion_CarImpact1.breff", breftPath = "Minigame/ThunderRoadRace/TR_Scorpion_CarImpact1.breft", pos={-75.0, 50, 100} } ParticleEffect.Setup{ name = "P2_Spray_Front", attachToCmp="Car_P2", attachToNodeOnCmp="SCparticleLocator", effectName = "Vehicle_FrontSpray", breffPath = "Minigame/ThunderRoadRace/TR_WaterDriveSpray.breff", breftPath = "Minigame/ThunderRoadRace/TR_WaterDriveSpray.breft" } ParticleEffect.Setup{ name = "P2_Spray_Left", attachToCmp="Car_P2", attachToNodeOnCmp="SCparticleLocator", effectName = "Vehicle_SideSprayL", breffPath = "Minigame/ThunderRoadRace/TR_WaterDriveSpray.breff", breftPath = "Minigame/ThunderRoadRace/TR_WaterDriveSpray.breft" } ParticleEffect.Setup{ name = "P2_Spray_Right", attachToCmp="Car_P2", attachToNodeOnCmp="SCparticleLocator", effectName = "Vehicle_SideSprayR", breffPath = "Minigame/ThunderRoadRace/TR_WaterDriveSpray.breff", breftPath = "Minigame/ThunderRoadRace/TR_WaterDriveSpray.breft" } -- Water Wake --[[Model.Setup { name = "T2_Spray_Wake", assetName = "WaterWake", } Animation.Setup{ name = "T2_Spray_Wake_Anim", modelCmp="T2_Spray_Wake", assetName = "WaterWake" }]]-- -- Gears LYTPane.Setup{ name = "T2_GearMeter", paneName = "player2", layoutCmp = "TeamGears" } LYTPane.Setup{ name = "T2_GearFill", paneName = "P2_meterFill", layoutCmp = "TeamGears" } LYTPane.Setup{ name = "T2_GearFillCap", paneName = "P2_meterFillCap", layoutCmp = "TeamGears" } LYTTextPane.Setup{ name = "T2_GearNumber", paneName = "P2_gearNoText_FL", outlinePaneName = "P2_gearNoText_ST", layoutCmp = "TeamGears", maxNumCharacters = 1 } LYTAnimation.Setup { name = "T2_GearMeter_Entry", animName = "TR_speedMeter_P2_meterEntry.brlan", paneCmp = "T2_GearMeter", layoutCmp = "TeamGears" } LYTAnimation.Setup { name = "T2_GearMeter_Exit", animName = "TR_speedMeter_P2_meterExit.brlan", paneCmp = "T2_GearMeter", layoutCmp = "TeamGears" } LYTAnimation.Setup { name = "T2_GearMeter_ChangeGearNow", animName = "TR_speedMeter_P2_changeGearNow.brlan", paneCmp = "T2_GearMeter", layoutCmp = "TeamGears" } LYTAnimation.Setup { name = "T2_GearMeter_GearChanged", animName = "TR_speedMeter_P2_gearChanged.brlan", paneCmp = "T2_GearMeter", layoutCmp = "TeamGears" } -------------------------- -- SCENE -------------------------- ParticleEffect.Setup{ name = "Wind_SpeedLines", effectName = "Wind", breffPath = "Minigame/ThunderRoadRace/TR_WindSpeedlines.breff", breftPath = "Minigame/ThunderRoadRace/TR_WindSpeedlines.breft" } CameraAnimation.Setup{ name = "IntroCam", assetName = "IntroCam" } CameraAnimation.Setup{ name = "MidwayCam", assetName = "MidwayCam" } CameraAnimation.Setup{ name = "OutroCam", assetName = "OutroCam" } ----------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------- -- Player 1 ----------------------------------------------------------------------------------- Csi.BeginScript( "P1_Gear_Up" ) SoundBank.Play{ name = "TrackSoundBank", event = "P1_GearUp" } SoundBank.Play{ name = "TrackSoundBank", event = "P1_GearSuccess1" } SoundBank.Play{ name = "TrackSoundBank", event = "P1_Blast", target="wiimote_p1" } Csi.EndScript() Csi.BeginScript( "P1_Gear_UpTo_2" ) SoundBank.Play{ name = "TrackSoundBank", event = "P1_GearUpTo2" } SoundBank.Play{ name = "TrackSoundBank", event = "P1_GearUp", target="wiimote_p1" } SoundBank.Play{ name = "TrackSoundBank", event = "P1_GearUp" } Csi.EndScript() Csi.BeginScript( "P1_Gear_UpTo_3" ) SoundBank.Play{ name = "TrackSoundBank", event = "P1_GearUpTo3" } SoundBank.Play{ name = "TrackSoundBank", event = "P1_GearUp", target="wiimote_p1" } SoundBank.Play{ name = "TrackSoundBank", event = "P1_GearUp" } Csi.EndScript() Csi.BeginScript( "P1_Gear_Down" ) SoundBank.Play{ name = "TrackSoundBank", event = "P1_GearDown", target="wiimote_p1" } SoundBank.Play{ name = "TrackSoundBank", event = "P1_GearUp" } Csi.EndScript() Csi.BeginScript( "P1_Gear_DownTo_2" ) SoundBank.Play{ name = "TrackSoundBank", event = "P1_GearDownTo2" } SoundBank.Play{ name = "TrackSoundBank", event = "P1_GearUp" } Csi.EndScript() Csi.BeginScript( "P1_Gear_DownTo_1" ) SoundBank.Play{ name = "TrackSoundBank", event = "P1_GearDownTo1" } SoundBank.Play{ name = "TrackSoundBank", event = "P1_GearUp" } Csi.EndScript() Csi.BeginScript( "P1_Gear_Fail" ) SoundBank.Play{ name = "TrackSoundBank", event = "P1_GearFail", target="wiimote_p1" } Csi.EndScript() Csi.BeginScript( "P1_Horn" ) SoundBank.Play{ name = "TrackSoundBank", event = "P1_Horn", target="wiimote_p1" } SoundBank.Play{ name = "TrackSoundBank", event = "P1_Horn" } Csi.EndScript() Csi.BeginScript( "HitCone" ) SoundBank.Play{ name = "TrackSoundBank", event = "Hit_TrafficCone" } Csi.EndScript() Csi.BeginScript( "HitTrashCan" ) SoundBank.Play{ name = "TrackSoundBank", event = "Hit_TrashCan" } Csi.EndScript() Csi.BeginScript( "HitCardboardBox" ) SoundBank.Play{ name = "TrackSoundBank", event = "Hit_CardboardBox" } Csi.EndScript() Csi.BeginScript( "HitCrate" ) SoundBank.Play{ name = "TrackSoundBank", event = "Hit_Crate" } Csi.EndScript() Csi.BeginScript( "HitPalette" ) SoundBank.Play{ name = "TrackSoundBank", event = "Hit_Palette" } Csi.EndScript() Csi.BeginScript( "HitTrashbag" ) SoundBank.Play{ name = "TrackSoundBank", event = "Hit_PlasticBag" } Csi.EndScript() Csi.BeginScript( "HitOilSlick" ) SoundBank.Play{ name = "TrackSoundBank", event = "Hit_Oil" } Csi.EndScript() Csi.BeginScript( "HitPuddle" ) SoundBank.Play{ name = "TrackSoundBank", event = "Hit_Puddle" } Csi.EndScript() Csi.BeginScript( "T1_HitWater_Start" ) --Component.SetRender{ name="T1_Spray_Wake", enabled=true } ParticleEffect.Play{ name = "P1_Spray_Front" } ParticleEffect.Play{ name = "P1_Spray_Left" } ParticleEffect.Play{ name = "P1_Spray_Right" } SoundBank.Play{ name = "TrackSoundBank", event = "P1_ThruWater" } Csi.EndScript() Csi.BeginScript( "T1_HitWater_End" ) --Component.SetRender{ name="T1_Spray_Wake", enabled=false } ParticleEffect.Stop{ name = "P1_Spray_Front" } ParticleEffect.Stop{ name = "P1_Spray_Left" } ParticleEffect.Stop{ name = "P1_Spray_Right" } SoundBank.Play{ name = "TrackSoundBank", event = "P1_ThruWaterStop" } Csi.EndScript() Csi.BeginScript( "T2_HitWater_Start" ) --Component.SetRender{ name="T2_Spray_Wake", enabled=true } ParticleEffect.Play{ name = "P2_Spray_Front" } ParticleEffect.Play{ name = "P2_Spray_Left" } ParticleEffect.Play{ name = "P2_Spray_Right" } SoundBank.Play{ name = "TrackSoundBank", event = "P2_ThruWater" } Csi.EndScript() Csi.BeginScript( "T2_HitWater_End" ) --Component.SetRender{ name="T2_Spray_Wake", enabled=false } ParticleEffect.Stop{ name = "P2_Spray_Front" } ParticleEffect.Stop{ name = "P2_Spray_Left" } ParticleEffect.Stop{ name = "P2_Spray_Right" } SoundBank.Play{ name = "TrackSoundBank", event = "P2_ThruWaterStop" } Csi.EndScript() Csi.BeginScript( "Mid_Cutscene_Skidmarks" ) Script.SetCommandWaiting{ enabled=true } Script.Wait{ time= 2.0 } Script.SetCommandWaiting{ enabled=false } ParticleEffect.Play{ name="P1_Skid_Left" } ParticleEffect.Play{ name="P1_Skid_Right" } ParticleEffect.Play{ name="P2_Skid_Left" } ParticleEffect.Play{ name="P2_Skid_Right" } Csi.EndScript() -- Player 2 ----------------------------------------------------------------------------------- Csi.BeginScript( "P2_Gear_Up" ) SoundBank.Play{ name = "TrackSoundBank", event = "P2_GearUp" } SoundBank.Play{ name = "TrackSoundBank", event = "P2_GearSuccess1" } SoundBank.Play{ name = "TrackSoundBank", event = "P2_Blast", target="wiimote_p2" } Csi.EndScript() Csi.BeginScript( "P2_Gear_UpTo_2" ) SoundBank.Play{ name = "TrackSoundBank", event = "P2_GearUpTo2" } SoundBank.Play{ name = "TrackSoundBank", event = "P2_GearUp", target="wiimote_p2" } SoundBank.Play{ name = "TrackSoundBank", event = "P2_GearUp" } Csi.EndScript() Csi.BeginScript( "P2_Gear_UpTo_3" ) SoundBank.Play{ name = "TrackSoundBank", event = "P2_GearUpTo3" } SoundBank.Play{ name = "TrackSoundBank", event = "P2_GearUp", target="wiimote_p2" } SoundBank.Play{ name = "TrackSoundBank", event = "P2_GearUp" } Csi.EndScript() Csi.BeginScript( "P2_Gear_Down" ) SoundBank.Play{ name = "TrackSoundBank", event = "P2_GearDown", target="wiimote_p2" } SoundBank.Play{ name = "TrackSoundBank", event = "P2_GearUp" } Csi.EndScript() Csi.BeginScript( "P2_Gear_DownTo_2" ) SoundBank.Play{ name = "TrackSoundBank", event = "P2_GearDownTo2" } SoundBank.Play{ name = "TrackSoundBank", event = "P2_GearUp" } Csi.EndScript() Csi.BeginScript( "P2_Gear_DownTo_1" ) SoundBank.Play{ name = "TrackSoundBank", event = "P2_GearDownTo1" } SoundBank.Play{ name = "TrackSoundBank", event = "P2_GearUp" } Csi.EndScript() Csi.BeginScript( "P2_Gear_Fail" ) SoundBank.Play{ name = "TrackSoundBank", event = "P2_GearFail" , target="wiimote_p2" } Csi.EndScript() Csi.BeginScript( "P2_Horn" ) SoundBank.Play{ name = "TrackSoundBank", event = "P2_Horn", target="wiimote_p2" } SoundBank.Play{ name = "TrackSoundBank", event = "P2_Horn" } Csi.EndScript() ----------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------- -- Intro Script ------------------------------------------------------------------------------- Csi.BeginScript( "Intro" ) Scene.SetLightGroup{ name="IntroLightGroup" } Scene.SetCameraClipPlanes{ near = 40.0, far = 32000.0 } Scene.SetDof{ focalRange = 800.0, nearFocusDistance = 150.0, farFocusDistance = 5000.0, centreFocusDistance = 500.0 } --Scene.SetDof{ focalRange = 800.0, nearFocusDistance = 150.0, farFocusDistance = 5000.0, modelCmp = "Car_P1" } -- 16:9 positioning PosRotScale.SetPos{ name = "T1_GearMeter", pos = { -355, -160, 0 } } PosRotScale.SetPos{ name = "T2_GearMeter", pos = { 355, -160, 0 } } -- 4:3 positioning --PosRotScale.SetPos{ name = "T1_GearMeter", pos = { -275, -60, 0 } } --PosRotScale.SetPos{ name = "T2_GearMeter", pos = { 275, -60, 0 } } PosRotScale.SetScale{ name = "T1_GearMeter", scale = { 0.9, 0.9, 0 } } PosRotScale.SetScale{ name = "T2_GearMeter", scale = { 0.9, 0.9, 0 } } --Component.SetRender{ name="T1_Spray_Wake", enabled=false } --Component.SetRender{ name="T2_Spray_Wake", enabled=false } --FrameController.Play{ name="T1_Spray_Wake_Anim", speed=1, offset=0, looping=true } --FrameController.Play{ name="T2_Spray_Wake_Anim", speed=1, offset=0, looping=true } SoundBank.Play{ name = "TrackSoundBank", event = "ThunderRoad_Intro" } SoundBank.Play{ name = "TrackSoundBank", event = "Atmos_TR01" } -- Start playing Danny and Tom intro animations --Dof.SetFocalDistance{ name="DofCmp", value="500" } --Dof.SetFocalRange{ name="DofCmp", value="9080" } --Dof.SetBlurShift{ name="DofCmp", value="0.75" } ParticleEffect.Play{ name = "P1_Exhaust_Left" } ParticleEffect.Play{ name = "P1_Exhaust_Right" } ParticleEffect.Play{ name = "P2_Exhaust_Left" } ParticleEffect.Play{ name = "P2_Exhaust_Right" } Component.SetRender{ name="BridgeSegmentStart", enabled=true } Component.SetRender{ name="BridgeSegmentMidway", enabled=false } Component.SetRender{ name="ChaCha", enabled=true } Component.SetRender{ name="EndJump", enabled=false } Component.SetRender{ name="IntroTrack", enabled=true } Component.SetRender{ name="MidroundTrack", enabled=false } FrameController.Play{ name="P1_Car_Intro", speed=1, offset=0, maintainLastFrame=true } FrameController.Play{ name="P1_Char_Intro", speed=1, offset=0, maintainLastFrame=true } FrameController.Play{ name="P2_Car_Intro", speed=1, offset=0, maintainLastFrame=true } FrameController.Play{ name="P2_Char_Intro", speed=1, offset=0, maintainLastFrame=true } FrameController.Play{ name="ChaCha_Intro", speed=1, offset=0, maintainLastFrame=true } FrameController.Play{ name="Train_01", speed=.5, offset=0, looping=true } FrameController.Play{ name="Train_02", speed=.5, offset=0, looping=true } FrameController.Play{ name="Train_03", speed=.5, offset=0, looping=true } FrameController.Play{ name="Train_04", speed=.5, offset=0, looping=true } -- Play Intro cam and wait for it to finish Script.SetCommandWaiting{ enabled=true } FrameController.Play{ name="IntroCam", speed=1, offset=0 } Script.SetCommandWaiting{ enabled=false } ParticleEffect.Stop{ name = "P1_Exhaust_Left" } ParticleEffect.Stop{ name = "P1_Exhaust_Right" } ParticleEffect.Stop{ name = "P2_Exhaust_Left" } ParticleEffect.Stop{ name = "P2_Exhaust_Right" } Scene.SetDof{ focalRange = 2000.0, nearFocusDistance = 150.0, farFocusDistance = 10000.0, modelCmp = "Car_P1" } Csi.EndScript() -- Hide things not needed for the actual race Csi.BeginScript( "HideNonRace" ) Component.SetRender{ name="BridgeSegmentStart", enabled=false } Component.SetRender{ name="BridgeSegmentMidway", enabled=false } Component.SetRender{ name="ChaCha", enabled=false } Scene.SetLightGroup{ name="DefaultLightGroup" } Csi.EndScript() -- Turn Around -------------------------------------------------------------------------------- -- Danny Ahead Csi.BeginScript( "DannyTurn" ) SoundBank.Play{ name = "TrackSoundBank", event = "Midway_Danny" } Scene.SetLightGroup{ name="MidwayLightGroup" } -- Start playing Danny and Tom Midway animations --Dof.SetFocalDistance{ name="DofCmp", value="750" } --Dof.SetFocalRange{ name="DofCmp", value="3000" } --Dof.SetBlurShift{ name="DofCmp", value="0.75" } Scene.SetDof{ focalRange = 800.0, nearFocusDistance = 150.0, farFocusDistance = 5000.0, centreFocusDistance = 500.0 } Component.SetRender{ name="BridgeSegmentStart", enabled=false } Component.SetRender{ name="BridgeSegmentMidway", enabled=true } Component.SetRender{ name="IntroTrack", enabled=false } Component.SetRender{ name="MidroundTrack", enabled=true } Component.SetRender{ name="ChaCha", enabled=false} FrameController.Play{ name="P1_Car_MidWay_Win", speed=1, offset=0, maintainLastFrame=true } FrameController.Play{ name="P1_Char_MidWay_Win", speed=1, offset=0, maintainLastFrame=true } Model.SetPos{ name = "Car_P1", pos = { 0.0, 0.2, 0.0} } Model.SetRot{ name = "Car_P1", rot = { 0.0, 0.0, 0.0} } FrameController.Play{ name="P2_Car_MidWay_Lose", speed=1, offset=0, maintainLastFrame=true } FrameController.Play{ name="P2_Char_MidWay_Lose", speed=1, offset=0, maintainLastFrame=true } Model.SetPos{ name = "Car_P2", pos = { 0.0, 0.2, 0.0} } Model.SetRot{ name = "Car_P2", rot = { 0.0, 0.0, 0.0} } --Play Skidmark script Script.Run{ name="Mid_Cutscene_Skidmarks", loop=false } -- Play Intro cam and wait for it to finish Script.SetCommandWaiting{ enabled=true } FrameController.Play{ name="MidwayCam", speed=1, offset=0 } Script.SetCommandWaiting{ enabled=false } ParticleEffect.Stop{ name="P1_Skid_Left" } ParticleEffect.Stop{ name="P1_Skid_Right" } ParticleEffect.Stop{ name="P2_Skid_Left" } ParticleEffect.Stop{ name="P2_Skid_Right" } Scene.SetDof{ focalRange = 2000.0, nearFocusDistance = 150.0, farFocusDistance = 10000.0, modelCmp = "Car_P1" } Csi.EndScript() -- Leo Ahead Csi.BeginScript( "LeoTurn" ) SoundBank.Play{ name = "TrackSoundBank", event = "Midway_LeoWinning" } Scene.SetLightGroup{ name="MidwayLightGroup" } -- Start playing Danny and Tom Midway animations --Dof.SetFocalDistance{ name="DofCmp", value="750" } --Dof.SetFocalRange{ name="DofCmp", value="3000" } --Dof.SetBlurShift{ name="DofCmp", value="0.75" } Scene.SetDof{ focalRange = 800.0, nearFocusDistance = 150.0, farFocusDistance = 5000.0, centreFocusDistance = 500.0 } Component.SetRender{ name="BridgeSegmentStart", enabled=false } Component.SetRender{ name="BridgeSegmentMidway", enabled=true } Component.SetRender{ name="IntroTrack", enabled=false } Component.SetRender{ name="MidroundTrack", enabled=true } Component.SetRender{ name="ChaCha", enabled=false} --Play Skidmark script Script.Run{ name="Mid_Cutscene_Skidmarks", loop=false } FrameController.Play{ name="P1_Car_MidWay_Lose", speed=1, offset=0, maintainLastFrame=true } FrameController.Play{ name="P1_Char_MidWay_Lose", speed=1, offset=0, maintainLastFrame=true } Model.SetPos{ name = "Car_P1", pos = { 0.0, 0.2, 0.0} } Model.SetRot{ name = "Car_P1", rot = { 0.0, 0.0, 0.0} } FrameController.Play{ name="P2_Car_MidWay_Win", speed=1, offset=0, maintainLastFrame=true } FrameController.Play{ name="P2_Char_MidWay_Win", speed=1, offset=0, maintainLastFrame=true } Model.SetPos{ name = "Car_P2", pos = { 0.0, 0.2, 0.0} } Model.SetRot{ name = "Car_P2", rot = { 0.0, 0.0, 0.0} } -- Play Intro cam and wait for it to finish Script.SetCommandWaiting{ enabled=true } FrameController.Play{ name="MidwayCam", speed=1, offset=0 } Script.SetCommandWaiting{ enabled=false } ParticleEffect.Stop{ name="P1_Skid_Left" } ParticleEffect.Stop{ name="P1_Skid_Right" } ParticleEffect.Stop{ name="P2_Skid_Left" } ParticleEffect.Stop{ name="P2_Skid_Right" } Scene.SetDof{ focalRange = 2000.0, nearFocusDistance = 150.0, farFocusDistance = 10000.0, modelCmp = "Car_P1" } Csi.EndScript() -- Outro Script ------------------------------------------------------------------------------- -- Danny Wins Csi.BeginScript( "DannyOutro" ) SoundBank.Play{ name = "TrackSoundBank", event = "WinRace_Danny" } Scene.SetLightGroup{ name="OutroLightGroup" } -- Start playing Danny and Tom Outro animations Scene.SetDof{ focalRange = 800.0, nearFocusDistance = 150.0, farFocusDistance = 5000.0, centreFocusDistance = 500.0 } FrameController.Stop{ name="Train_01"} FrameController.Stop{ name="Train_02"} FrameController.Stop{ name="Train_03"} FrameController.Stop{ name="Train_04"} --Dof.SetFocalDistance{ name="DofCmp", value="750" } --Dof.SetFocalRange{ name="DofCmp", value="3000" } --Dof.SetBlurShift{ name="DofCmp", value="0.75" } Component.SetRender{ name="BridgeSegmentStart", enabled=true } Component.SetRender{ name="BridgeSegmentMidway", enabled=false } Component.SetRender{ name="ChaCha", enabled=false} Component.SetRender{ name="EndJump", enabled=true } Component.SetRender{ name="IntroTrack", enabled=true } Component.SetRender{ name="MidroundTrack", enabled=false } FrameController.Play{ name="P1_Car_Outro_Win", speed=1, offset=0, maintainLastFrame=true } FrameController.Play{ name="P1_Char_Outro_Win", speed=1, offset=0, maintainLastFrame=true } Model.SetPos{ name = "Car_P1", pos = { 0.0, 0.2, 0.0} } Model.SetRot{ name = "Car_P1", rot = { 0.0, 0.0, 0.0} } FrameController.Play{ name="P2_Car_Outro_Lose", speed=1, offset=0, maintainLastFrame=true } FrameController.Play{ name="P2_Char_Outro_Lose", speed=1, offset=0, maintainLastFrame=true } Model.SetPos{ name = "Car_P2", pos = { 0.0, 0.2, 0.0} } Model.SetRot{ name = "Car_P2", rot = { 0.0, 0.0, 0.0} } -- Play Intro cam and wait for it to finish Script.SetCommandWaiting{ enabled=true } FrameController.Play{ name="OutroCam", speed=1, offset=0 } Csi.EndScript() -- Leo Wins Csi.BeginScript( "LeoOutro" ) SoundBank.Play{ name = "TrackSoundBank", event = "WinRace_Leo" } Scene.SetLightGroup{ name="OutroLightGroup" } -- Start playing Danny and Tom Outro animations Scene.SetDof{ focalRange = 800.0, nearFocusDistance = 150.0, farFocusDistance = 5000.0, centreFocusDistance = 500.0 } FrameController.Stop{ name="Train_01"} FrameController.Stop{ name="Train_02"} FrameController.Stop{ name="Train_03"} FrameController.Stop{ name="Train_04"} --Dof.SetFocalDistance{ name="DofCmp", value="750" } --Dof.SetFocalRange{ name="DofCmp", value="3000" } --Dof.SetBlurShift{ name="DofCmp", value="0.75" } Component.SetRender{ name="BridgeSegmentStart", enabled=true } Component.SetRender{ name="BridgeSegmentMidway", enabled=false } Component.SetRender{ name="ChaCha", enabled=false} Component.SetRender{ name="EndJump", enabled=true } Component.SetRender{ name="IntroTrack", enabled=true } Component.SetRender{ name="MidroundTrack", enabled=false } FrameController.Play{ name="P1_Car_Outro_Lose", speed=1, offset=0, maintainLastFrame=true } FrameController.Play{ name="P1_Char_Outro_Lose", speed=1, offset=0, maintainLastFrame=true } Model.SetPos{ name = "Car_P1", pos = { 0.0, 0.2, 0.0} } Model.SetRot{ name = "Car_P1", rot = { 0.0, 0.0, 0.0} } FrameController.Play{ name="P2_Car_Outro_Win", speed=1, offset=0, maintainLastFrame=true } FrameController.Play{ name="P2_Char_Outro_Win", speed=1, offset=0, maintainLastFrame=true } Model.SetPos{ name = "Car_P2", pos = { 0.0, 0.2, 0.0} } Model.SetRot{ name = "Car_P2", rot = { 0.0, 0.0, 0.0} } -- Play Intro cam and wait for it to finish Script.SetCommandWaiting{ enabled=true } FrameController.Play{ name="OutroCam", speed=1, offset=0 } Csi.EndScript() --------------------------------------------------------------------------------------------------- -----SoundScripts Csi.BeginScript( "SoundScript1" ) SoundBank.Play{ name = "TrackSoundBank", event = "P1_Turn" } Csi.EndScript() Csi.BeginScript( "SoundScript2" ) SoundBank.Play{ name = "TrackSoundBank", event = "P1_CarImpact" } SoundBank.Play{ name = "TrackSoundBank", event = "P1_Turn" } Csi.EndScript() Csi.BeginScript( "SoundScript3" ) SoundBank.Play{ name = "TrackSoundBank", event = "P1_CarImpact" } Csi.EndScript() Csi.BeginScript( "SoundScript4" ) SoundBank.Play{ name = "TrackSoundBank", event = "P2_Turn" } Csi.EndScript() Csi.BeginScript( "SoundScript5" ) SoundBank.Play{ name = "TrackSoundBank", event = "P2_CarImpact" } SoundBank.Play{ name = "TrackSoundBank", event = "P2_Turn" } Csi.EndScript() Csi.BeginScript( "SoundScript6" ) SoundBank.Play{ name = "TrackSoundBank", event = "P2_CarImpact" } Csi.EndScript() Csi.BeginScript( "SoundScript7" ) SoundBank.Play{ name = "TrackSoundBank", event = "P1_UpSide" } Csi.EndScript() Csi.BeginScript( "SoundScript8" ) SoundBank.Play{ name = "TrackSoundBank", event = "P2_UpSide" } Csi.EndScript() Csi.BeginScript( "SoundScript9" ) SoundBank.Play{ name = "TrackSoundBank", event = "TrainPassLeft" } Csi.EndScript() Csi.BeginScript( "SoundScript10" ) SoundBank.Play{ name = "TrackSoundBank", event = "TrainPassRight" } Csi.EndScript()