// September 2015 // Levee Patroller / Dijk Patrouille // This source file is (c) by Deltares. This source file is open source but only available to select users. Do not redistribute without written permission of Stichting Deltares, Delft, The Netherlands. // This header has been automatically generated. class LeveeFailurePiping extends LeveeFailure placeable; #exec OBJ LOAD FILE=PrimDikeSM.usx #exec OBJ LOAD FILE=Environmentsounds.uax function SetFailureOptions() { /// Failure information: LinkedTile.Mechanism = Mechanism; Mechanism = FM_Piping; NL_FailureName = "Piping"; EN_FailureName = "Piping"; super.SetFailureOptions(); LinkedTile.CurrentState = STA_Reportable; } function CreateObjects() { local DynamicMover M; local DynVariableTimedMover Mv; local DynamicMeshActor sMA; local Emitter E; local FluidSurfaceInfo fluid; local float waterlevel; local vector loc; /// Get water level: fluid = LinkedTile.GetFluidSurfaceObject(); if (fluid != None) { waterlevel = fluid.Location.Z + 2; /// Add z offset. } /// ID is the same as the linked object: id = LinkedTile.Name; /// Creating World Objects: /// For the record: The likely center is: 12800.00,-13824.00,64.00 M = CreateMover(RotateVector(672.00,1056.00,-1216.00), id$"PipeCrashWater", StaticMesh'PrimDikeSM.BreakTroughFX.WildWaterMeshPiping' , 3.00, 2); M.SetKeyPos( RotateVectorNoLocation(-832.00,-1152.00,1192.00), 1); M.SetKeyRot( rot(0,0,6444), 1); RotationOffset(M, LinkedTile.Rotation, 0,0,-6444); M = CreateMover(RotateVector(-1952.00,-800.00,-288.00), id$"PipeCrater", StaticMesh'PrimDikeSM.Piping.SandCrater' , 120.00, 2); M.SetDrawScale(0.50); M.SetKeyPos( RotateVectorNoLocation(0.00,0.00,120.00), 1); M.SetKeyRot( rot(0,0,0), 1); RotationOffset(M, LinkedTile.Rotation, 0,0,0); Mv = CreateVariableMover(Location, id$"PipingCrash", StaticMesh'PrimDikeSM.Piping.PrimPipeFront' , 5.00, 3); Mv.SetKeyPos( RotateVectorNoLocation(0.00,0.00,-64.00), 1); Mv.SetKeyRot( rot(0,0,160), 1); Mv.SetMovetime(5.000000,1); Mv.SetKeyPos( RotateVectorNoLocation(-8.00,0.00,-704.00), 2); Mv.SetKeyRot( rot(0,0,1920), 2); Mv.SetMovetime(5.000000,2); RotationOffset(Mv, LinkedTile.Rotation, 0,0,0); sMA = CreateMesh(Location, id$"StaticMeshActor", StaticMesh'PrimDikeSM.Piping.PrimPipeBase'); RotationOffset(sMA, LinkedTile.Rotation, 0,0,0); Mv = CreateVariableMover(Location, id$"PipingCrashMid", StaticMesh'PrimDikeSM.Piping.PrimPipeMid' , 5.00, 3); Mv.SetKeyPos( RotateVectorNoLocation(0.00,0.00,-32.00), 1); Mv.SetKeyRot( rot(0,0,0), 1); Mv.SetMovetime(5.000000,1); Mv.SetKeyPos( RotateVectorNoLocation(-8.00,0.00,-448.00), 2); Mv.SetKeyRot( rot(0,0,0), 2); Mv.SetMovetime(5.000000,2); RotationOffset(Mv, LinkedTile.Rotation, 0,0,0); Mv = CreateVariableMover(Location, id$"PipingCrash", StaticMesh'PrimDikeSM.Piping.PrimPipeRight' , 5.00, 3); Mv.SetKeyPos( RotateVectorNoLocation(0.00,0.00,0.00), 1); Mv.SetKeyRot( rot(-192,0,0), 1); Mv.SetMovetime(5.000000,1); Mv.SetKeyPos( RotateVectorNoLocation(0.00,96.00,32.00), 2); Mv.SetKeyRot( rot(-2576,0,0), 2); Mv.SetMovetime(5.000000,2); RotationOffset(Mv, LinkedTile.Rotation, 0,0,0); Mv = CreateVariableMover(Location, id$"PipingCrash", StaticMesh'PrimDikeSM.Piping.PrimPipeLeft' , 5.00, 3); Mv.SetKeyPos( RotateVectorNoLocation(0.00,0.00,-64.00), 1); Mv.SetKeyRot( rot(144,0,0), 1); Mv.SetMovetime(5.000000,1); Mv.SetKeyPos( RotateVectorNoLocation(-8.00,-320.00,-1120.00), 2); Mv.SetKeyRot( rot(3200,0,0), 2); Mv.SetMovetime(5.000000,2); RotationOffset(Mv, LinkedTile.Rotation, 0,0,0); M = CreateMover(RotateVector(-4521.10,-2044.16,-708.00), id$"MeasurePrimPipe", StaticMesh'SecDikeSM.Measures.ZandZakRing' , 1.00, 2); M.SetDrawScale(2.80); M.SetKeyPos( RotateVectorNoLocation(0.00,0.00,216.00), 1); M.SetKeyRot( rot(0,0,0), 1); RotationOffset(M, LinkedTile.Rotation, 0,16384,0); /// CHECK AT THE BOTTOM OF THIS FILE FOR ADDITIONAL OBJECTS CREATED IN THE 2ND PASS!!! /* E = Spawn(class''); E.SetLocation(RotateVector(-30159.63,14973.00,-523.13)); E.SetPropertyText("Tag", id$"None"); RotationOffset(E, LinkedTile.Rotation, 0,16384,0); AddToVIAList(E); E.AttachTag = GetName(id$"Lights1"); E.SetBase(GetActor(A.AttachTag), vect(0,0,1)); E = Spawn(class''); E.SetLocation(RotateVector(-29872.28,14031.94,-561.13)); E.SetPropertyText("Tag", id$"None"); RotationOffset(E, LinkedTile.Rotation, 0,16384,0); AddToVIAList(E); E.AttachTag = GetName(id$"Lights1"); E.SetBase(GetActor(A.AttachTag), vect(0,0,1)); E = Spawn(class''); E.SetLocation(RotateVector(-29872.41,13953.87,-561.13)); E.SetPropertyText("Tag", id$"None"); RotationOffset(E, LinkedTile.Rotation, 0,16384,0); AddToVIAList(E); E.AttachTag = GetName(id$"Lights1"); E.SetBase(GetActor(A.AttachTag), vect(0,0,1)); */ E = Spawn(class'BigMudEmitter'); //E.SetLocation(); loc = RotateVector(-4538.00,-2010.00,waterlevel); loc.z = waterlevel; E.SetLocation(loc); E.SetPropertyText("Tag", id$"PipeBigMud"); RotationOffset(E, LinkedTile.Rotation, 0,16384,0); AddToVIAList(E); E = Spawn(class'PipingMeasureEmitterB'); E.SetLocation(RotateVector(-4580.00,-1687.00,-654.00)); E.SetPropertyText("Tag", id$"MeasurePrimPipe"); RotationOffset(E, LinkedTile.Rotation, 0,16384,0); AddToVIAList(E); E.AttachTag = GetName(id$"MeasurePrimPipe"); E.SetBase(GetActor(E.AttachTag), vect(0,0,1)); E = Spawn(class'PipingMeasureEmitterB'); E.SetLocation(RotateVector(-4423.00,-1670.00,-681.00)); E.SetPropertyText("Tag", id$"MeasurePrimPipe"); RotationOffset(E, LinkedTile.Rotation, 0,16384,0); AddToVIAList(E); E.AttachTag = GetName(id$"MeasurePrimPipe"); E.SetBase(GetActor(E.AttachTag), vect(0,0,1)); E = Spawn(class'PipingMeasureEmitterB'); E.SetLocation(RotateVector(-4440.00,-2386.00,-658.00)); E.SetPropertyText("Tag", id$"MeasurePrimPipe"); RotationOffset(E, LinkedTile.Rotation, 0,16384,0); AddToVIAList(E); E.AttachTag = GetName(id$"MeasurePrimPipe"); E.SetBase(GetActor(E.AttachTag), vect(0,0,1)); E = Spawn(class'LotsOfWaterEmitter'); E.SetLocation(RotateVector(-4032.00,-2080.00,-312.00)); E.SetPropertyText("Tag", id$"PipeLotsOfWaterEmitter"); RotationOffset(E, LinkedTile.Rotation, 0,16384,0); AddToVIAList(E); E = Spawn(class'SplashCrashEmitter'); E.SetLocation(RotateVector(1280.00,-2080.00,584.00)); E.SetPropertyText("Tag", id$"PipeCrashSplashEmitter"); RotationOffset(E, LinkedTile.Rotation, 0,16384,0); AddToVIAList(E); E = Spawn(class'MudBubbles'); loc = RotateVector(-4537.00,-2009.00,waterlevel); loc.z = waterlevel; E.SetLocation(loc); E.SetPropertyText("Tag", id$"PipeBubbles"); RotationOffset(E, LinkedTile.Rotation, 0,16384,0); AddToVIAList(E); /// Call parent: Super.CreateObjects(); } function CreateTriggers() { local DScriptedTrigger sT; sT = Spawn(class'DScriptedTrigger'); /// Tag is the same as the linked object name: sT.Tag = GetFailureName(); FailureScript = sT; /// Store in public leveetile var. /// Position is the same as the linked object: sT.SetLocation(LinkedTile.Location); sT.Actions.insert(0, 26); sT.Actions[0] = new class'ACTION_WaitForTimer'; ACTION_WaitForTimer(sT.Actions[0]).PauseTime = 10.00 * speedfactor; sT.Actions[1] = new class'ACTION_IfActive'; ACTION_IfActive(sT.Actions[1]).FailureTag = GetName(id$""); sT.Actions[2] = new class'ACTION_TriggerEvent'; ACTION_TriggerEvent(sT.Actions[2]).Event = GetName(id$"PipeBubbles"); sT.Actions[3] = new class'ACTION_WaitForTimer'; ACTION_WaitForTimer(sT.Actions[3]).PauseTime = 600.00 * speedfactor; sT.Actions[4] = new class'ACTION_IfRelevant'; ACTION_IfRelevant(sT.Actions[4]).FailureTag = GetName(id$""); sT.Actions[5] = new class'ACTION_TriggerEvent'; ACTION_TriggerEvent(sT.Actions[5]).Event = GetName(id$"PipeCrater"); sT.Actions[6] = new class'ACTION_WaitForTimer'; ACTION_WaitForTimer(sT.Actions[6]).PauseTime = 300.00 * speedfactor; sT.Actions[7] = new class'ACTION_IfCritical'; ACTION_IfCritical(sT.Actions[7]).FailureTag = GetName(id$""); sT.Actions[8] = new class'ACTION_WaitForTimer'; ACTION_WaitForTimer(sT.Actions[8]).PauseTime = 4.00 * speedfactor; sT.Actions[9] = new class'ACTION_TriggerEvent'; ACTION_TriggerEvent(sT.Actions[9]).Event = GetName(id$"PipeBigMud"); sT.Actions[10] = new class'ACTION_WaitForTimer'; ACTION_WaitForTimer(sT.Actions[10]).PauseTime = 300.00 * speedfactor; sT.Actions[11] = new class'ACTION_IfNoRightMeasuresTaken'; ACTION_IfNoRightMeasuresTaken(sT.Actions[11]).FailureTag = GetName(id$""); sT.Actions[12] = new class'ACTION_Failed'; ACTION_Failed(sT.Actions[12]).FailureTag = GetName(id$""); sT.Actions[13] = new class'ACTION_TriggerEvent'; ACTION_TriggerEvent(sT.Actions[13]).Event = GetName(id$"PipingCrashMid"); sT.Actions[14] = new class'ACTION_TriggerEvent'; ACTION_TriggerEvent(sT.Actions[14]).Event = GetName(id$"PipingCrash"); sT.Actions[15] = new class'ACTION_WaitForTimer'; ACTION_WaitForTimer(sT.Actions[15]).PauseTime = 10.00 * speedfactor; sT.Actions[16] = new class'ACTION_TriggerEventOnce'; ACTION_TriggerEventOnce(sT.Actions[16]).EventN = LinkedTile.WaterMover.Tag; // GetName(id$"TopPolderWaterMover"); sT.Actions[17] = new class'ACTION_DestroyActor'; ACTION_DestroyActor(sT.Actions[17]).DestroyTag = GetName(id$"RainyActor"); sT.Actions[18] = new class'ACTION_TriggerEvent'; ACTION_TriggerEvent(sT.Actions[18]).Event = GetName(id$"PipeCrashSplashEmitter"); sT.Actions[19] = new class'ACTION_WaitForTimer'; ACTION_WaitForTimer(sT.Actions[19]).PauseTime = 1.00 * speedfactor; sT.Actions[20] = new class'ACTION_SetHidden'; ACTION_SetHidden(sT.Actions[20]).HideActorTag = GetName(id$"PipeCrashWater"); ACTION_SetHidden(sT.Actions[20]).bHidden = False; sT.Actions[21] = new class'ACTION_TriggerEvent'; ACTION_TriggerEvent(sT.Actions[21]).Event = GetName(id$"PipeCrashWater"); /* If you want to have sounds, uncomment this: (And update all indices) sT.Actions[22] = new class'ACTION_PlaySound'; ACTION_PlaySound(sT.Actions[22]).Sound = Sound'EnvironmentSounds.Water.Breach02'; ACTION_PlaySound(sT.Actions[22]).Volume = 255.000000; ACTION_PlaySound(sT.Actions[22]).Pitch = 1.000000; ACTION_PlaySound(sT.Actions[22]).bAttenuate = false; */ sT.Actions[22] = new class'ACTION_WaitForTimer'; ACTION_WaitForTimer(sT.Actions[22]).PauseTime = 2.00 * speedfactor; sT.Actions[23] = new class'ACTION_TriggerEvent'; ACTION_TriggerEvent(sT.Actions[23]).Event = GetName(id$"PipeLotsOfWaterEmitter"); sT.Actions[24] = new class'ACTION_WaitForTimer'; ACTION_WaitForTimer(sT.Actions[24]).PauseTime = 50.00 * speedfactor; sT.Actions[25] = new class'ACTION_EndGame'; } function CreateSignals() { local SignalWaterOutflow signal0; local SignalReportWaterOutflow signal0report0; local SignalReportWaterOutflow signal0report1; local SignalReportWaterOutflow signal0report2; /// Signals information: Signals.Insert(0,1); /// local SignalWaterOutflow signal0; signal0 = New class'SignalWaterOutflow'; signal0.CrossCutLocation=CUT_HinterLand; signal0.SignalType=SIG_WaterOutflow; signal0.SignalReports.insert(0,3); signal0report0 = New class'SignalReportWaterOutflow'; signal0report0.CurrentSpeed = SPE_Slow; signal0report0.FlushingSoil = GEO_No; signal0report0.FlushingSoilQuantity = QUA_None; signal0report0.GeoState = STA_Reportable; signal0report0.LengthOfDamage = SIZE_VerySmall; signal0report0.LengthOfDamageMax = SIZE_Medium; /// jln - 19-02-2009 modified, so length is larger than width, see changes document Casper. signal0report0.MultipleLocations = GEO_No; signal0report0.WaterFlowOut = QUA_Little; signal0report0.WidthOfDamage = SIZE_VerySmall; signal0report0.WidthOfDamageMax = SIZE_VerySmall; signal0.SignalReports[0] = signal0report0; Signals[0] = signal0; signal0report1 = New class'SignalReportWaterOutflow'; signal0report1.CurrentSpeed = SPE_Slow; signal0report1.FlushingSoil = GEO_Yes; signal0report1.FlushingSoilQuantity = QUA_Little; signal0report1.GeoState = STA_Relevant; signal0report1.LengthOfDamage = SIZE_VerySmall; signal0report1.LengthOfDamageMax = SIZE_Medium; signal0report1.MultipleLocations = GEO_No; signal0report1.WaterFlowOut = QUA_Little; signal0report1.WidthOfDamage = SIZE_VerySmall; signal0report1.WidthOfDamageMax = SIZE_Medium; signal0.SignalReports[1] = signal0report1; Signals[0] = signal0; signal0report2 = New class'SignalReportWaterOutflow'; signal0report2.CurrentSpeed = SPE_Slow; signal0report2.FlushingSoil = GEO_Yes; signal0report2.FlushingSoilQuantity = QUA_Much; signal0report2.GeoState = STA_Critical; signal0report2.LengthOfDamage = SIZE_Medium; signal0report2.LengthOfDamageMax = SIZE_Large; signal0report2.MultipleLocations = GEO_No; signal0report2.WaterFlowOut = QUA_Much; signal0report2.WidthOfDamage = SIZE_Small; signal0report2.WidthOfDamageMax = SIZE_Medium; signal0.SignalReports[2] = signal0report2; Signals[0] = signal0; } function CreateMeasures() { local Measure Msr; /// Creating measures: Measures.Insert(0,1); Msr = New class'Measure'; Msr.SetPropertyText("EventMeasureTaken", id$"MeasurePrimPipeTrigger"); Msr.bMeasureEffective = True; Msr.MeasureType = MEA_ContainmentRing; Measures[0] = Msr; } function CreateMeasureScripts() { local DScriptedTrigger sT; sT = Spawn(class'DScriptedTrigger'); /// Position is the same as the linked object: sT.SetLocation(LinkedTile.Location); /// Trying to write down extra measure scriptedtriggers /// Trying to find: MeasurePrimPipeTrigger sT.Actions.insert(0, 8); sT.Actions[0] = new class'ACTION_WaitForEvent'; ACTION_WaitForEvent(sT.Actions[0]).ExternalEvent = GetName(id$"MeasurePrimPipeTrigger"); sT.Actions[1] = new class'ACTION_SetHidden'; ACTION_SetHidden(sT.Actions[1]).HideActorTag = GetName(id$"MeasurePrimPipe"); ACTION_SetHidden(sT.Actions[1]).bHidden = False; sT.Actions[2] = new class'ACTION_TriggerEvent'; ACTION_TriggerEvent(sT.Actions[2]).Event = GetName(id$"MeasurePrimPipe"); sT.Actions[3] = new class'ACTION_WaitForTimer'; ACTION_WaitForTimer(sT.Actions[3]).PauseTime = 1.00 * speedfactor; sT.Actions[4] = new class'ACTION_TriggerEvent'; ACTION_TriggerEvent(sT.Actions[4]).Event = GetName(id$"PipeBigMud"); sT.Actions[5] = new class'ACTION_DestroyActor'; ACTION_DestroyActor(sT.Actions[5]).DestroyTag = GetName(id$"PipeBigMud"); sT.Actions[6] = new class'ACTION_TriggerEvent'; ACTION_TriggerEvent(sT.Actions[6]).Event = GetName(id$"None"); sT.Actions[7] = new class'ACTION_DestroyActor'; ACTION_DestroyActor(sT.Actions[7]).DestroyTag = GetName(id$"PipeBubbles"); }