// 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 LeveeFailureMacro extends LeveeFailure placeable; #exec OBJ LOAD FILE=HumanLandscapeSM.usx function SetFailureOptions() { /// Failure information: Mechanism = FM_Macro; LinkedTile.Mechanism = Mechanism; NL_FailureName = "MacroStabiliteit"; EN_FailureName = "MacroStability"; super.SetFailureOptions(); LinkedTile.CurrentState = STA_Reportable; } function CreateObjects() { local DynamicMover M; //local DynVariableTimedMover Mv; local DynamicMeshActor sMA; local Emitter E; /// ID is the same as the linked object: id = LinkedTile.Name; /// Creating World Objects: /// For the record: The likely center is: 12800.00,-7680.00,64.00 M = CreateMover(RotateVector(0.00,0.00,-320.00), id$"MudPile", StaticMesh'PrimDikeSM.MacroStab.GrassyMudPile' , 16.00, 2); M.SetKeyPos( RotateVectorNoLocation(0.00,0.00,288.00), 1); M.SetKeyRot( rot(0,0,0), 1); RotationOffset(M, LinkedTile.Rotation, 0,0,0); M = CreateMover(RotateVector(448.00,400.00,48.00), id$"DitchMovement", StaticMesh'PrimDikeSM.MacroStab.MudInDitch' , 180.00, 2); M.SetKeyPos( RotateVectorNoLocation(-384.00,0.00,0.00), 1); M.SetKeyRot( rot(0,0,0), 1); RotationOffset(M, LinkedTile.Rotation, 0,0,0); sMA = CreateMesh(Location, id$"StaticMeshActor", StaticMesh'PrimDikeSM.MacroStab.NonFailingDykePiece'); RotationOffset(sMA, LinkedTile.Rotation, 0,0,0); M = CreateMover(Location, id$"Slide", StaticMesh'PrimDikeSM.MacroStab.DykeFailureMain' , 10.00, 3); M.SetKeyPos( RotateVectorNoLocation(-16.00,0.00,-32.00), 1); M.SetKeyRot( rot(0,0,112), 1); M.SetKeyPos( RotateVectorNoLocation(-294.00,-0.20,-449.99), 2); M.SetKeyRot( rot(0,0,1136), 2); M.OtherTime = 180.00 * speedfactor; RotationOffset(M, LinkedTile.Rotation, 0,0,0); M = CreateMover(Location, id$"front", StaticMesh'PrimDikeSM.MacroStab.DykeFailureFront' , 6.00, 2); M.SetKeyPos( RotateVectorNoLocation(-416.00,0.00,-1368.00), 1); M.SetKeyRot( rot(0,0,4096), 1); M.AttachTag = GetName(id$"Slide"); M.SetBase(GetActor(M.AttachTag), vect(0,0,1)); RotationOffset(M, LinkedTile.Rotation, 0,0,0); M = CreateMover(Location, id$"TopCrash", StaticMesh'PrimDikeSM.MacroStab.DykeFailureTop' , 10.00, 2); M.SetKeyPos( RotateVectorNoLocation(-264.00,0.00,-336.00), 1); M.SetKeyRot( rot(0,0,2048), 1); RotationOffset(M, LinkedTile.Rotation, 0,0,0); M = CreateMover(Location, id$"RoadFront", StaticMesh'PrimDikeSM.MacroStab.RoadFront' , 180.00, 2); M.SetKeyPos( RotateVectorNoLocation(-34.00,0.00,2.00), 1); M.SetKeyRot( rot(0,0,448), 1); M.AttachTag = GetName(id$"Slide"); M.SetBase(GetActor(M.AttachTag), vect(0,0,1)); RotationOffset(M, LinkedTile.Rotation, 0,0,0); M = CreateMover(Location, id$"BackCrash", StaticMesh'PrimDikeSM.MacroStab.DykeFailureBackRight' , 3.00, 3); M.SetKeyPos( RotateVectorNoLocation(96.00,224.00,-192.00), 1); M.SetKeyRot( rot(0,-1024,-1024), 1); M.SetKeyPos( RotateVectorNoLocation(896.00,960.00,-736.00), 2); M.SetKeyRot( rot(0,-3072,-4096), 2); RotationOffset(M, LinkedTile.Rotation, 0,0,0); M = CreateMover(Location, id$"BackCrash", StaticMesh'PrimDikeSM.MacroStab.DykeFailureBackLeft' , 3.00, 3); M.SetKeyPos( RotateVectorNoLocation(-672.00,-608.00,-448.00), 1); M.SetKeyRot( rot(0,1024,-3072), 1); M.SetKeyPos( RotateVectorNoLocation(-640.00,-896.00,-832.00), 2); M.SetKeyRot( rot(0,2048,-5120), 2); RotationOffset(M, LinkedTile.Rotation, 0,0,0); M = CreateMover(Location, id$"Crack4", StaticMesh'PrimDikeSM.MacroStab.CrackBack' , 10.00, 3); M.SetKeyPos( RotateVectorNoLocation(17.00,-5.00,-2.00), 1); M.SetKeyRot( rot(0,0,0), 1); M.SetKeyPos( RotateVectorNoLocation(0.00,0.00,-864.00), 2); M.SetKeyRot( rot(0,0,0), 2); RotationOffset(M, LinkedTile.Rotation, 0,0,0); M = CreateMover(Location, id$"Crack3", StaticMesh'PrimDikeSM.MacroStab.Crack4' , 10.00, 3); M.SetKeyPos( RotateVectorNoLocation(9.00,0.00,-1.00), 1); M.SetKeyRot( rot(0,0,0), 1); M.SetKeyPos( RotateVectorNoLocation(0.00,0.00,-928.00), 2); M.SetKeyRot( rot(0,0,0), 2); RotationOffset(M, LinkedTile.Rotation, 0,0,0); M = CreateMover(Location, id$"Crack1", StaticMesh'PrimDikeSM.MacroStab.Crack3' , 90.00, 3); M.SetKeyPos( RotateVectorNoLocation(18.00,0.00,-1.00), 1); M.SetKeyRot( rot(0,0,0), 1); M.SetKeyPos( RotateVectorNoLocation(0.00,0.00,-928.00), 2); M.SetKeyRot( rot(0,0,0), 2); RotationOffset(M, LinkedTile.Rotation, 0,0,0); M = CreateMover(Location, id$"Crack5", StaticMesh'PrimDikeSM.MacroStab.Crack2' , 10.00, 3); M.SetKeyPos( RotateVectorNoLocation(20.00,0.00,-1.00), 1); M.SetKeyRot( rot(0,0,0), 1); M.SetKeyPos( RotateVectorNoLocation(0.00,0.00,-928.00), 2); M.SetKeyRot( rot(0,0,0), 2); RotationOffset(M, LinkedTile.Rotation, 0,0,0); M = CreateMover(Location, id$"Crack2", StaticMesh'PrimDikeSM.MacroStab.Crack1' , 120.00, 3); M.SetKeyPos( RotateVectorNoLocation(12.00,0.00,-1.00), 1); M.SetKeyRot( rot(0,0,0), 1); M.SetKeyPos( RotateVectorNoLocation(0.00,0.00,-928.00), 2); M.SetKeyRot( rot(0,0,0), 2); RotationOffset(M, LinkedTile.Rotation, 0,0,0); M = CreateMover(RotateVector(608.00,0.00,-1216.00), id$"CrashWater", StaticMesh'PrimDikeSM.BreakTroughFX.WildWaterMesh' , 3.00, 2); M.SetKeyPos( RotateVectorNoLocation(-832.00,0.00,1280.00), 1); M.SetKeyRot( rot(0,0,6144), 1); RotationOffset(M, LinkedTile.Rotation, 0,0,-6144); /// None - NOT FOUND M = CreateMover(RotateVector(256.00,-992.00,-208.00), id$"MacroMeasureRoadBlock", StaticMesh'HumanLandscapeSM.ConstructionStuff.ReflectorPole' , 1.00, 2); M.SetKeyPos( RotateVectorNoLocation(0.00,0.00,0.00), 1); M.SetKeyRot( rot(0,0,0), 1); M.AttachTag = GetName(id$"PrimMacroMeasure"); M.SetBase(GetActor(M.AttachTag), vect(0,0,1)); RotationOffset(M, LinkedTile.Rotation, 0,14336,0); M = CreateMover(RotateVector(208.00,-5104.00,-208.00), id$"MacroMeasureRoadBlock", StaticMesh'HumanLandscapeSM.ConstructionStuff.ReflectorPole' , 1.00, 2); M.SetKeyPos( RotateVectorNoLocation(0.00,0.00,0.00), 1); M.SetKeyRot( rot(0,0,0), 1); M.AttachTag = GetName(id$"PrimMacroMeasure"); M.SetBase(GetActor(M.AttachTag), vect(0,0,1)); RotationOffset(M, LinkedTile.Rotation, 0,18432,0); M = CreateMover(RotateVector(0.00,0.00,-896.00), id$"PrimMacroMeasure", StaticMesh'PrimDikeSM.MacroStab.MacroMeasure' , 1.00, 2); M.SetKeyPos( RotateVectorNoLocation(0.00,0.00,896.00), 1); M.SetKeyRot( rot(0,0,0), 1); RotationOffset(M, LinkedTile.Rotation, 0,0,0); /// Creating World Objects: E = Spawn(class'LotsOfWaterEmitter'); E.SetLocation(RotateVector(-4032.00,-3136.00,-312.00)); E.SetPropertyText("Tag", id$"LotsOfWaterEmitter"); RotationOffset(E, LinkedTile.Rotation, 0,16384,0); AddToVIAList(E); E = Spawn(class'SplashCrashEmitter'); E.SetLocation(RotateVector(1280.00,-3136.00,608.00)); E.SetPropertyText("Tag", id$"CrashSplashEmitter"); RotationOffset(E, LinkedTile.Rotation, 0,16384,0); AddToVIAList(E); /// Call parent: Super.CreateObjects(); } function CreateTriggers() { local DScriptedTrigger sT; //local float speed; sT = Spawn(class'DScriptedTrigger'); /// Tag is the same as the linked object: 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, 42); 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_SetHidden'; ACTION_SetHidden(sT.Actions[2]).HideActorTag = GetName(id$"Crack1"); ACTION_SetHidden(sT.Actions[2]).bHidden = True; sT.Actions[3] = new class'ACTION_SetHidden'; ACTION_SetHidden(sT.Actions[3]).HideActorTag = GetName(id$"Crack2"); ACTION_SetHidden(sT.Actions[3]).bHidden = True; sT.Actions[4] = new class'ACTION_WaitForTimer'; ACTION_WaitForTimer(sT.Actions[4]).PauseTime = 600.00 * speedfactor; sT.Actions[5] = new class'ACTION_IfRelevant'; ACTION_IfRelevant(sT.Actions[5]).FailureTag = GetName(id$""); sT.Actions[6] = new class'ACTION_TriggerEvent'; ACTION_TriggerEvent(sT.Actions[6]).Event = GetName(id$"Crack3"); sT.Actions[7] = new class'ACTION_TriggerEvent'; ACTION_TriggerEvent(sT.Actions[7]).Event = GetName(id$"DitchMovement"); sT.Actions[8] = new class'ACTION_WaitForTimer'; ACTION_WaitForTimer(sT.Actions[8]).PauseTime = 10.00 * speedfactor; sT.Actions[9] = new class'ACTION_TriggerEvent'; ACTION_TriggerEvent(sT.Actions[9]).Event = GetName(id$"Crack4"); sT.Actions[10] = new class'ACTION_WaitForTimer'; ACTION_WaitForTimer(sT.Actions[10]).PauseTime = 10.00 * speedfactor; sT.Actions[11] = new class'ACTION_TriggerEvent'; ACTION_TriggerEvent(sT.Actions[11]).Event = GetName(id$"Crack5"); sT.Actions[12] = new class'ACTION_WaitForTimer'; ACTION_WaitForTimer(sT.Actions[12]).PauseTime = 60.00 * speedfactor; sT.Actions[13] = new class'ACTION_SetHidden'; ACTION_SetHidden(sT.Actions[13]).HideActorTag = GetName(id$"Crack3"); ACTION_SetHidden(sT.Actions[13]).bHidden = True; sT.Actions[14] = new class'ACTION_SetHidden'; ACTION_SetHidden(sT.Actions[14]).HideActorTag = GetName(id$"Crack4"); ACTION_SetHidden(sT.Actions[14]).bHidden = True; sT.Actions[15] = new class'ACTION_SetHidden'; ACTION_SetHidden(sT.Actions[15]).HideActorTag = GetName(id$"Crack5"); ACTION_SetHidden(sT.Actions[15]).bHidden = True; sT.Actions[16] = new class'ACTION_IfCritical'; ACTION_IfCritical(sT.Actions[16]).FailureTag = GetName(id$""); sT.Actions[17] = new class'ACTION_TriggerEvent'; ACTION_TriggerEvent(sT.Actions[17]).Event = GetName(id$"RoadFront"); sT.Actions[18] = new class'ACTION_WaitForTimer'; ACTION_WaitForTimer(sT.Actions[18]).PauseTime = 180.00 * speedfactor; sT.Actions[19] = new class'ACTION_TriggerEvent'; ACTION_TriggerEvent(sT.Actions[19]).Event = GetName(id$"Slide"); sT.Actions[20] = new class'ACTION_WaitForTimer'; ACTION_WaitForTimer(sT.Actions[20]).PauseTime = 2.00 * speedfactor; sT.Actions[21] = new class'ACTION_SetHidden'; ACTION_SetHidden(sT.Actions[21]).HideActorTag = GetName(id$"MudPile"); ACTION_SetHidden(sT.Actions[21]).bHidden = False; sT.Actions[22] = new class'ACTION_TriggerEvent'; ACTION_TriggerEvent(sT.Actions[22]).Event = GetName(id$"MudPile"); sT.Actions[23] = new class'ACTION_WaitForTimer'; ACTION_WaitForTimer(sT.Actions[23]).PauseTime = 280.00 * speedfactor; sT.Actions[24] = new class'ACTION_IfNoRightMeasuresTaken'; ACTION_IfNoRightMeasuresTaken(sT.Actions[24]).FailureTag = GetName(id$""); sT.Actions[25] = new class'ACTION_Failed'; ACTION_Failed(sT.Actions[25]).FailureTag = GetName(id$""); sT.Actions[26] = new class'ACTION_TriggerEvent'; ACTION_TriggerEvent(sT.Actions[26]).Event = GetName(id$"TopCrash"); sT.Actions[27] = new class'ACTION_WaitForTimer'; ACTION_WaitForTimer(sT.Actions[27]).PauseTime = 10.00 * speedfactor; sT.Actions[28] = new class'ACTION_TriggerEvent'; ACTION_TriggerEvent(sT.Actions[28]).Event = GetName(id$"front"); sT.Actions[29] = new class'ACTION_WaitForTimer'; ACTION_WaitForTimer(sT.Actions[29]).PauseTime = 10.00 * speedfactor; sT.Actions[30] = new class'ACTION_TriggerEventOnce'; ACTION_TriggerEventOnce(sT.Actions[30]).Eventn = LinkedTile.WaterMover.Tag; sT.Actions[31] = new class'ACTION_DestroyActor'; ACTION_DestroyActor(sT.Actions[31]).DestroyTag = GetName(id$"RainyActor"); sT.Actions[32] = new class'ACTION_WaitForTimer'; ACTION_WaitForTimer(sT.Actions[32]).PauseTime = 5.00 * speedfactor; sT.Actions[33] = new class'ACTION_TriggerEvent'; ACTION_TriggerEvent(sT.Actions[33]).Event = GetName(id$"BackCrash"); sT.Actions[34] = new class'ACTION_SetHidden'; ACTION_SetHidden(sT.Actions[34]).HideActorTag = GetName(id$"CrashWater"); ACTION_SetHidden(sT.Actions[34]).bHidden = False; sT.Actions[35] = new class'ACTION_TriggerEvent'; ACTION_TriggerEvent(sT.Actions[35]).Event = GetName(id$"CrashWater"); sT.Actions[36] = new class'ACTION_TriggerEvent'; ACTION_TriggerEvent(sT.Actions[36]).Event = GetName(id$"CrashSplashEmitter"); sT.Actions[37] = new class'ACTION_WaitForTimer'; ACTION_WaitForTimer(sT.Actions[37]).PauseTime = 3.00 * speedfactor; sT.Actions[38] = new class'ACTION_TriggerEvent'; ACTION_TriggerEvent(sT.Actions[38]).Event = GetName(id$"LotsOfWaterEmitter"); sT.Actions[39] = new class'ACTION_DestroyActor'; ACTION_DestroyActor(sT.Actions[39]).DestroyTag = GetName(id$"MudEmitter"); sT.Actions[40] = new class'ACTION_WaitForTimer'; ACTION_WaitForTimer(sT.Actions[40]).PauseTime = 50.00 * speedfactor; sT.Actions[41] = new class'ACTION_EndGame'; } function CreateSignals() { local SignalHorizontalMovement signal0; local SignalReportHorizontalMovement signal0report0; local SignalSettlement signal1; local SignalReportSettlement signal1report0; local SignalCrack signal2; local SignalReportCrack signal2report0; local SignalReportCrack signal2report1; /// Signals information: Signals.Insert(0,3); /// local SignalHorizontalMovement signal0; signal0 = New class'SignalHorizontalMovement'; signal0.FirstState=STA_Relevant; signal0.CrossCutLocation=CUT_HinterLand; signal0.SignalReports.insert(0,1); /// local SignalReportHorizontalMovement signal0report0; signal0report0 = New class'SignalReportHorizontalMovement'; signal0report0.GeoState = STA_Relevant; signal0report0.LengthOfDamage = SIZE_Medium; signal0report0.LengthOfDamageMax = SIZE_MediumLarge; signal0report0.WidthOfDamage = SIZE_VerySmall; signal0report0.WidthOfDamageMax = SIZE_Medium; signal0.SignalReports[0] = signal0report0; Signals[0] = signal0; /// local SignalSettlement signal1; signal1 = New class'SignalSettlement'; signal1.RevetmentType=REV_Asphalt; signal1.SettlementPosition=SET_Inwards; signal1.FirstState=STA_Critical; signal1.CrossCutLocation=CUT_Top; signal1.SignalReports.insert(0,1); /// local SignalReportSettlement signal1report0; signal1report0 = New class'SignalReportSettlement'; signal1report0.GeoState = STA_Critical; signal1report0.HeightDifference = SIZE_MediumLarge; signal1report0.HeightDifferenceMax = SIZE_VeryLarge; signal1report0.LengthOfDamage = SIZE_VeryLarge; signal1report0.LengthOfDamageMax = SIZE_VeryLarge; signal1report0.WidthOfDamage = SIZE_Large; signal1report0.WidthOfDamageMax = SIZE_VeryLarge; signal1.SignalReports[0] = signal1report0; Signals[1] = signal1; /// local SignalCrack signal2; signal2 = New class'SignalCrack'; signal2.RevetmentType=REV_Asphalt; signal2.FirstState=STA_Reportable; signal2.CrossCutLocation=CUT_Top; signal2.CrackType=CRK_Parallel; signal2.SignalReports.insert(0,2); /// local SignalReportCrack signal2report0; signal2report0 = New class'SignalReportCrack'; signal2report0.GeoState = STA_Reportable; signal2report0.MultipleCracks = GEO_Yes; signal2report0.FlushingSoil = GEO_No; signal2report0.FlushingSoilQuantity = QUA_NONE; signal2report0.LengthOfDamage = SIZE_Medium; signal2report0.LengthOfDamageMax = SIZE_MediumLarge; signal2report0.WidthOfDamage = SIZE_VerySmall; signal2report0.WidthOfDamageMax = SIZE_MediumLarge; signal2.SignalReports[0] = signal2report0; Signals[2] = signal2; /// local SignalReportCrack signal2report1; signal2report1 = New class'SignalReportCrack'; signal2report1.GeoState = STA_Relevant; signal2report1.MultipleCracks = GEO_Yes; signal2report1.FlushingSoil = GEO_No; signal2report1.FlushingSoilQuantity = QUA_NONE; signal2report1.LengthOfDamage = SIZE_MediumLarge; signal2report1.LengthOfDamageMax = SIZE_Large; signal2report1.WidthOfDamage = SIZE_VerySmall; signal2report1.WidthOfDamageMax = SIZE_Large; signal2.SignalReports[1] = signal2report1; Signals[2] = signal2; } function CreateMeasures() { local Measure Msr; /// Creating measures: Measures.Insert(0,1); Msr = New class'Measure'; Msr.SetPropertyText("EventMeasureTaken", id$"PrimMacroMeasure"); Msr.bMeasureEffective = True; Msr.MeasureType = MEA_SandBank_SlakeningSlope; Measures[0] = Msr; } function CreateMeasureScripts() { local DScriptedTrigger sT; sT = Spawn(class'DScriptedTrigger'); /// Trying to write down extra measure scriptedtriggers /// Trying to find: PrimMacroMeasure sT.Actions.insert(0, 4); sT.Actions[0] = new class'ACTION_WaitForEvent'; ACTION_WaitForEvent(sT.Actions[0]).ExternalEvent = GetName(id$"PrimMacroMeasure"); sT.Actions[1] = new class'ACTION_SetHidden'; ACTION_SetHidden(sT.Actions[1]).HideActorTag = GetName(id$"PrimMacroMeasure"); ACTION_SetHidden(sT.Actions[1]).bHidden = False; sT.Actions[2] = new class'ACTION_SetHidden'; ACTION_SetHidden(sT.Actions[2]).HideActorTag = GetName(id$"MacroMeasureRoadBlock"); ACTION_SetHidden(sT.Actions[2]).bHidden = False; sT.Actions[3] = new class'ACTION_DestroyActor'; ACTION_DestroyActor(sT.Actions[3]).DestroyTag = GetName(id$"CrashWater"); } defaultproperties { FailureSize = TS_48M; }