// 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. //============================================================================= // Levee Tile // // This is a single tile to make up a levee, this tile controls failures // // ------------------------------------------------------------ // Created by Almar Joling // © 2007, Geodelft // // Date Id Modification // 2007-09-19 jln Header created //============================================================================= class LeveeTile extends Actor placeable; #exec OBJ LOAD FILE=PrimDikeSM.usx #exec OBJ LOAD FILE=SecDikeSM.usx #exec OBJ LOAD FILE=TrafficSignsSM.usx #exec OBJ LOAD FILE=RensHouseStuffSM.usx #exec OBJ LOAD FILE=MatthijsSM.usx #exec OBJ LOAD FILE=MaartenWSM.usx /// List of failure signal present in this failure var array Signals; /// List of measures that this failure accepts var array Measures; var LocationNameSign MapLocationSign; /// The actual failure mechanism filled in by the level designer var GeoEnums.FailingMechanisms Mechanism; var GeoEnums.GeoStates CurrentState; var GeoEnums.GeoStates PreviousState; var RedMarker CurrentRedMarker; // The red marker which is in the failure. var(FailureSpecialActors) edfindable Actor TempActor; //This variable is not used for the failure, only to help placing actors in the editor var bool bIsSetStable; // If player has set the failure as stable var() enum TypeOfLevee { LT_PrimaryLevee, LT_RegionalLevee, LT_PeatLevee, LT_RegionalLeveeWithoutRoad, } LeveeType; /// Extend the tile at left/right side? var (LeveeTile) bool ExtendRightside; /// Is this tile in trainingmode? Special timing values will be enabled then. var(LeveeTile) bool IsTrainingTile; var(LeveeTile) GeoEnums.eTileSize TileSize; var (LeveeTile) FluidSurfaceInfo BotulismeFluidSurface; /// List of failures excluded. var(FailureSpecialActors) export editinline array ExcludedFailures; var(FailureSpecialActors) export editinline GraphicalActors OnlyVisibleIfNotActive; // List of actors that will only be visible if failure is inactive //var(LeveeTile) export editinline GraphicalActors DefaultMesh; // Default mesh which is visible if nothing else /// If we want this object to be a specific failure, var(LeveeTile) editinline GeoEnums.FailingMechanisms ConfiguredFailure; var(LeveeTile) editinline GeoEnums.GeoStates ConfiguredFailureState; /// Which water mover will be used for this tile? var(LeveeTile) edfindable Mover WaterMover; /// For timing: var (LeveeTile) editinline float speedfactor; /// Additional config values: var (LeveeTile) editinline string extraconfig; var(FailureName) string NL_FailureName, EN_FailureName; var bool bActive; // If dike failure is active var bool bDetected; // If the failure was detected rightly var bool bReported; // If it was already reported is probably not the same as bReported in the signals var bool bNotFailure; // Shouldn't be changed, only when marker is putted out of volume var bool bRelevant; // If failure is Relevant var bool bCritical; // If failure is Critical var bool bReportable; // If failure is Reportable var bool bFailed; // If failure is Failed var() localized string LocationName; var LeveeFailure MyFailure; var array FailuresOnRegional,FailuresOnPrimary,FailuresOnRegionalWithoutRoad; /// 3 state textures: var ScriptedTexture state_textures[4]; var int draw_state[4]; /// rendered it? var int stateid; var float delay; function PreBeginPlay () { /// We could extend the Localization to do other cool stuff like getting failure information? //GLD = new class'GeoLevelDetails'; //MapNumber = GLD.CurrentLevelScenarioNumber; FailuresOnRegional = GetFailuresOnRegional(); FailuresOnPrimary = GetFailuresOnPrimary(); FailuresOnRegionalWithoutRoad = GetFailuresOnRegionalWithoutRoad(); /// Get ambientglow from external file! AmbientGlow = int(Localize ("LeveeTile", "AmbientGlow", "GeoSimulator")); /// Create state textures: PreviousState = STA_NONE; state_textures[0]=ScriptedTexture(Level.ObjectPool.AllocateObject( class'ScriptedTexture' ) ); state_textures[0].Client=self; state_textures[0].SetSize(256,256); //state_textures[0].RefreshRate=0; } /// Check if state changed. function Tick(float dt) { return; if (CurrentState != PreviousState) { delay += dt; if (delay > 2) { /// Update previous state: PreviousState = CurrentState; /// Create texture: /// Determine stateid: if (CurrentState == STA_Reportable) stateid = 0; if (CurrentState == STA_Relevant) stateid = 1; if (CurrentState == STA_Critical) stateid = 2; if (CurrentState == STA_Failed) stateid = 3; /// Allocate image: state_textures[stateid]=ScriptedTexture(Level.ObjectPool.AllocateObject( class'ScriptedTexture' ) ); state_textures[stateid].Client=self; state_textures[stateid].SetSize(256,256); Log("Created texture"); delay = 0; } } } /* event RenderTexture(ScriptedTexture Tex) { local PlayerController PC; local vector camloc; local Rotator camrot; local Actor camactor; local Color tAlpha; return; if (draw_state[stateid] == 0) { talpha.R=238; talpha.G=238; talpha.B=238; PC = Level.GetLocalPlayerController(); PC.PlayerCalcView(camactor,camloc,camrot); camloc = self.location; camloc.z += 1000; camactor = self; camrot = rot(0, -32768,0); Tex.DrawPortal(0,0,Tex.USize,Tex.VSize,camactor,camloc,camrot,PC.DefaultFOV,false); /// save state: draw_state[stateid] = 1; } //Tex.DrawTile(0,0,Tex.USize,Tex.VSize,0,0,16,16,FinalBlend'DreamTex.Lightfilter',talpha); }*/ function SetType(GeoEnums.FailingMechanisms mechanism) { local name failname; local float randomval; // Log ("Configured Failure: " @ ConfiguredFailure); /// Do we have an configured type? if (ConfiguredFailure != FM_None) { /// Can this be different? failname = GetEnum( enum'FailingMechanisms', ConfiguredFailure ); if (ConfiguredFailure == FM_Piping ) MyFailure = Spawn(class 'LeveeFailurePiping'); if (ConfiguredFailure == FM_MicroTutorial) MyFailure = Spawn(class 'LeveeFailureMicroTutorial'); if (ConfiguredFailure == FM_Macro ) { /// Determine if this is a primary levee macro failure, or a secondary. if (LeveeType == LT_PrimaryLevee) MyFailure = Spawn(class 'LeveeFailureMacro'); if (LeveeType == LT_RegionalLevee) MyFailure = Spawn(class 'LeveeFailureMacroRegional'); } if (ConfiguredFailure == FM_ErosionInner) { /// If this is ErosionInner it could be: /// - ErosionInner with human activity on primary /// - ErosionInner with overtopping on a regional levee. if (LeveeType == LT_PrimaryLevee) { //Log ("Creating inner erosion"); MyFailure = Spawn(class 'LeveeFailureErosionInner'); } if (LeveeType == LT_RegionalLevee || LeveeType == LT_RegionalLeveeWithoutRoad) { Log("Creating regional inner erosion"); MyFailure = Spawn(class 'LeveeFailureErosionInnerRegional'); } } /// Outer RipRap comes in two versions. One with a corner, and one without. We will use the staticmesh to determine /// which kind we have to display (Instr is case sensitive, convert to caps first!): if (ConfiguredFailure == FM_ErosionOuterRipRap ) { if (Instr(Caps(self.StaticMesh), "STRAIGHT") > -1) { /// MEsh contains straight, choose straight version. MyFailure = Spawn(class 'LeveeFailureErosionOuterRipRap_Straight'); } else { /// Corner version: MyFailure = Spawn(class 'LeveeFailureErosionOuterRipRap_Corner'); } } if (ConfiguredFailure == FM_ErosionOuterFloatingWaste) MyFailure = Spawn(class 'LeveeFailureErosionOuterFloatingWaste'); if (ConfiguredFailure == FM_ErosionInnerMicro ) MyFailure = Spawn(class 'LeveeFailureErosionInnerMicro'); if (ConfiguredFailure == FM_DroogteWilnis ) MyFailure = Spawn(class 'LeveeFailureDroogteWilnis'); if (ConfiguredFailure == FM_DroogteMultipleCracks ) MyFailure = Spawn(class 'LeveeFailureDroogteMultipleCracks'); if (ConfiguredFailure == FM_DroogteWigCrack ) MyFailure = Spawn(class 'LeveeFailureDroogteWigCrack'); if (ConfiguredFailure == FM_WaterQuality ) MyFailure = Spawn(class 'LeveeFailureBotulisme'); if (ConfiguredFailure == FM_Micro ) MyFailure = Spawn(class 'LeveeFailureMicro'); } else { //Log("[LeveeTile] Set Mechanism type: " @ mechanism @ " " @ Name ); if (LeveeType == LT_PrimaryLevee) { /// temp methode switch( mechanism ) { case FM_Piping: MyFailure = Spawn(class 'LeveeFailurePiping'); break; case FM_Macro: MyFailure = Spawn(class 'LeveeFailureMacro'); break; case FM_ErosionOuterRipRap: /// Outer RipRap comes in two versions. One with a corner, and one without. We will use the staticmesh to determine /// which kind we have to display (Instr is case sensitive, convert to caps first!): if (Instr(Caps(self.StaticMesh), "STRAIGHT") > -1) { if (FRand() < 0.4) { MyFailure = Spawn(class 'LeveeFailureErosionOuterFloatingWaste'); } else { /// MEsh contains straight, choose straight version. MyFailure = Spawn(class 'LeveeFailureErosionOuterRipRap_Straight'); } } else { /// Corner version: MyFailure = Spawn(class 'LeveeFailureErosionOuterRipRap_Corner'); } break; case FM_ErosionOuterFloatingWaste: MyFailure = Spawn(class 'LeveeFailureErosionOuterFloatingWaste'); break; case FM_ErosionInner: /// If this is ErosionInner it could be: /// - ErosionInner with human activity on primary (<= selected here) /// - ErosionInner with overtopping on a regional levee. MyFailure = Spawn(class 'LeveeFailureErosionInner'); break; case FM_ErosionInnerMicro: /// Does not exist for primary. break; default: MyFailure = Spawn(class 'LeveeFailurePiping'); break; } } if (LeveeType == LT_RegionalLevee) { switch( mechanism ) { case FM_Macro: MyFailure = Spawn(class 'LeveeFailureMacroRegional'); break; case FM_DroogteWilnis: MyFailure = Spawn(class 'LeveeFailureDroogteWilnis'); break; } } if (LeveeType == LT_RegionalLeveeWithoutRoad) { switch( mechanism ) { case FM_ErosionInnerMicro: /// If this is ErosionInner it could be: /// - ErosionInner with human activity on primary /// - ErosionInner with overtopping on a regional levee. (<= selected here) MyFailure = Spawn(class 'LeveeFailureErosionInnerMicro'); break; case FM_ErosionInner: /// 50 percent change for either micro or innerregional randomval = FRand(); Log("Erosion inner random value: " @ randomval); if (randomval <= 0.5) { MyFailure = Spawn(class 'LeveeFailureErosionInnerRegional'); } else { MyFailure = Spawn(class 'LeveeFailureErosionInnerMicro'); } break; case FM_Micro: MyFailure = Spawn(class 'LeveeFailureMicro'); break; case FM_DroogteMultipleCracks: MyFailure = Spawn(class 'LeveeFailureDroogteMultipleCracks'); break; case FM_DroogteWigCrack: MyFailure = Spawn(class 'LeveeFailureDroogteWigCrack'); break; case FM_WaterQuality: MyFailure = Spawn(class 'LeveeFailureBotulisme'); break; } } } if (MyFailure != None) { MyFailure.speedfactor = speedfactor; MyFailure.SetTile(self); MyFailure.OnlyVisibleIfNotActive = self.OnlyVisibleIfNotActive; /// Put the OnlyVisibleIfNotActive in the failure: MyFailure.InitFailure(); /// Copy various data from our failure class to this object: log("are there still failures here"); Signals = MyFailure.Signals; log("are there still failures here"@Signals[0].SignalType); Measures = MyFailure.Measures; Mechanism = MyFailure.Mechanism; /// Various properties: //NL_FailureName = "LeveeTile - NL"; //EN_FailureName = "LeveeTile - EN"; /// Tag is the same as the name: Tag = Name; CheckLocationSign(); } else { Log("[LeveeTile.SetType] Something went wrong because a failure could not be created! - " @ self); } //ActivateFailures(true); } /// jln - 27-03-2009 /// Gets the feedback name, eg: failure_macro_notserious function string GetFeedBackName(bool unreported) { local string s; s = "failure_"; if (unreported == true) { /// Not reporteD: s = "unobserved_"; } /// Determine string name: switch (Mechanism) { case FM_Piping: s = s $ "piping"; break; case FM_Macro: s = s $ "macro"; break; case FM_Micro: case FM_MicroTutorial: s = s $ "micro"; break; case FM_ErosionInner: if (LeveeType == LT_PrimaryLevee) { s = s $ "inner_human"; } else { s = s $ "inner_height"; } break; break; case FM_ErosionInnerMicro: s = s $ "inner_micro"; break; case FM_ErosionOuterFloatingWaste: s = s $ "outer_waste"; break; case FM_ErosionOuterRipRap: s = s $ "outer_riprap"; break; case FM_DroogteWilnis: s = s $ "droogte_wilnis"; break; case FM_DroogteMultipleCracks: s = s $ "droogte_multiplecracks"; break; case FM_DroogteWigCrack: s = s $ "droogte_wigcrack"; break; case FM_WaterQuality: s = s $ "droogte_botulisme"; break; }; /// This failure was reported: if (unreported == false) { /// Determine seriousness: switch (CurrentState) { case STA_Reportable: s = s $ "_notserious"; break; case STA_Relevant: s = s $ "_serious"; break; case STA_Critical: case STA_Failed: s = s $ "_veryserious"; break; } } return s; } function vector GetMin() { return myfailure.vMin; } function vector GetMax() { return myfailure.vMax; } function ActivateFailures(bool bActiveTemp) { if (MyFailure != None) { MyFailure.ActivateFailures(bActiveTemp); if (IsTrainingTile == True) { MyFailure.EnableSpecialTimings(); } ///Update bounding box: Log("Activate failures"); MyFailure.CreateBoundingBox(); } } /// Returns True if the center of the actor is within this failure. function bool Encompasses(actor ac, optional bool notolerance) { if (myfailure == none) return false; /// Return through failure object return myfailure.Encompasses(ac, notolerance); } function bool EncompassesVector(vector pos, optional bool notolerance) { /// Return through failure object if (myfailure == none) return false; return myfailure.EncompassesVector(pos, notolerance); } //***************************************************************************** // Will automaticly update the failure name location to the closest one //***************************************************************************** function CheckLocationSign() { local bool FirstSign; local actor A; local float TempDist; local float d; TempDist = 999999999; /// CHECK THE CLOSEST LOCATION SIGN FirstSign = true; foreach AllActors( class 'Actor', A, 'LocationNameSign') { d = Abs(VSize(Location - A.Location)); //Log("Distance: " @ A @ " dist: " @ d); if((d < TempDist) || FirstSign) { MapLocationSign=LocationNameSign(A); TempDist = d; FirstSign = false; } } } function GeoEnums.eTileSize GetFailureSize(GeoEnums.FailingMechanisms Mechanism) { if (Mechanism == FM_Piping) return TS_32M; if (LeveeType == LT_PrimaryLevee) { if (Mechanism == FM_Macro) return TS_48M; } else { if (Mechanism == FM_Macro) return TS_32M; } if (Mechanism == FM_Micro) return TS_16M; if (LeveeType == LT_PrimaryLevee) { if (Mechanism == FM_ErosionInner) return TS_48M; } else { if (Mechanism == FM_ErosionInner) return TS_32M; } if (Mechanism == FM_ErosionInnerMicro) return TS_32M; if (Mechanism == FM_ErosionOuterFloatingWaste) return TS_32M; if (Mechanism == FM_ErosionOuterRipRap) return TS_32M; /// jln - 03-03-2010 Wilnis. /// jln - 16-03-2010 Do not forget to update this when adding items [TODOADD] if (Mechanism == FM_DroogteWilnis) return TS_32M; if (Mechanism == FM_DroogteMultipleCracks) return TS_16M; if (Mechanism == FM_DroogteWigCrack) return TS_32M; if (Mechanism == FM_WaterQuality) return TS_16M; return TS_OTHER; } /// 2007-10-12 Jln Function to check if this tile supports the specified mechanism. function bool DoesSupport(GeoEnums.FailingMechanisms Mechanism) { //local supported; local bool found; local int i; if (self.LeveeType == LT_PrimaryLevee) { /// Check if supported: found = false; for (i = 0; i < FailuresOnPrimary.Length ; i++ ) { if (FailuresOnPrimary[i] == Mechanism) { found = true; break; } } /// Not found, return false. We do not support this type. if (found == false) { Log("[LeveeTile.DoesSupport] " @ GetEnum( enum'FailingMechanisms', Mechanism ) @ " - is NOT supported by PrimaryLevee @ " @ self.Name); return false; } } if (self.LeveeType == LT_RegionalLevee) { /// Check if supported: found = false; for (i = 0; i < FailuresOnRegional.Length ; i++ ) { if (FailuresOnRegional[i] == Mechanism) { found = true; break; } } /// Not found, return false. We do not support this type. if (found == false) { Log("[LeveeTile.DoesSupport] " @ GetEnum( enum'FailingMechanisms', Mechanism ) @ " - is NOT supported by RegionalLevee @ " @ self.Name); return false; } } if (self.LeveeType == LT_RegionalLeveeWithoutRoad) { /// Check if supported: found = false; for (i = 0; i < FailuresOnRegionalWithoutRoad.Length ; i++ ) { if (FailuresOnRegionalWithoutRoad[i] == Mechanism) { found = true; break; } } /// Not found, return false. We do not support this type. if (found == false) { Log("[LeveeTile.DoesSupport] " @ GetEnum( enum'FailingMechanisms', Mechanism ) @ " - is NOT supported by RegionalLeveeWithoutRoad @ " @ self.Name); return false; } } /// IF we are still here, it means that we still support it. But what does the exclusion array tell us? for (i = 0; i < ExcludedFailures.Length; i++ ) { if (ExcludedFailures[i] == Mechanism) { /// Found, so this one is excluded, return false Log("[LeveeTile.DoesSupport] " @ GetEnum( enum'FailingMechanisms', Mechanism ) @ " - is NOT supported (excluded) @ " @ self.Name); return false; } } if (ConfiguredFailure != FM_None) { /// This failure is configured for something else. Log("[LeveeTile.DoesSupport] " @ GetEnum( enum'FailingMechanisms', Mechanism ) @ " - is NOT supported (preconfigured as other failure) @ " @ self.Name); return false; } /// Check size: Log("Size: " @ self.GetFailureSize(Mechanism) @ " - " @ self.TileSize @ " result: " @ self.GetFailureSize(Mechanism) > self.TileSize); if (self.GetFailureSize(Mechanism) > self.TileSize) { Log("[LeveeTile.DoesSupport] " @ GetEnum( enum'FailingMechanisms', Mechanism ) @ " - is NOT supported by this tile - Too small! @ " @ self.Name); return false; } /// Still here? Good to go! Log("[LeveeTile.DoesSupport] " @ GetEnum( enum'FailingMechanisms', Mechanism ) @ " - seems to be supported " @ self.Name); return true; } static function array GetFailuresOnRegional() { local array FailuresOnRegional; FailuresOnRegional.Insert(0,2); FailuresOnRegional[0] = FM_Macro ; /// jln - 16-03-2010 Droogte: FailuresOnRegional[1] = FM_DroogteWilnis ; return FailuresOnRegional; } static function array GetFailuresOnPrimary() { local array FailuresOnPrimary; FailuresOnPrimary.Insert(0,5); FailuresOnPrimary[0] = FM_Piping; FailuresOnPrimary[1] = FM_Macro; FailuresOnPrimary[2] = FM_ErosionOuterRipRap ; FailuresOnPrimary[3] = FM_ErosionOuterFloatingWaste ; FailuresOnPrimary[4] = FM_ErosionInner ; return FailuresOnPrimary; } static function array GetFailuresOnRegionalWithoutRoad() { local array FailuresOnRegionalWithoutRoad; FailuresOnRegionalWithoutRoad.Insert(0,6); FailuresOnRegionalWithoutRoad[0] = FM_Micro ; FailuresOnRegionalWithoutRoad[1] = FM_ErosionInner ; FailuresOnRegionalWithoutRoad[2] = FM_ErosionInnerMicro; /// jln - 16-03-2010 Droogte: [TODOADD] FailuresOnRegionalWithoutRoad[3] = FM_DroogteMultipleCracks ; FailuresOnRegionalWithoutRoad[4] = FM_DroogteWigCrack; FailuresOnRegionalWithoutRoad[5] = FM_WaterQuality; return FailuresOnRegionalWithoutRoad; } /// Find FluidSurface which refers to our own water mover object: function FluidSurfaceInfo GetFluidSurfaceObject() { local FluidSurfaceInfo A; if (self.WaterMover != None) { foreach AllActors( class 'FluidSurfaceInfo', A) { if (A.AttachTag == self.WaterMover.Tag) { return A; } } } return None; } /// Called when destroyed: simulated function Destroyed() { Log("Destroying LeveeTile event"); } function RemovePawn ( ) { Log("Removing LeveeTile"); } /* Find extra movers (streetlights, roadsigns, etc) and attach these to the object on which they are positioned this way they'll move if needed. This function should be called AFTER a tile has been initialized. 2007-11-08 Jln Created function. */ function FindExtraMovers() { local DynamicMeshActor A; local string classname; /// Trace vars: local vector HitLocation, HitNormal; local vector start; local Actor target, temp; local bool found; local array meshes; local int i; //local int count; //local ActorAttacher attacher; meshes.insert(0,16); meshes[0] = StaticMesh'HumanLandscapeSM.FencePoles.WoodPole1'; meshes[1] = StaticMesh'HumanLandscapeSM.FencePoles.WoodPole2'; meshes[2] = StaticMesh'HumanLandscapeSM.FencePoles.WoodPole2'; meshes[3] = StaticMesh'RensHouseStuffSM.StreetLight.streetlight_01' ; meshes[4] = StaticMesh'HumanLandscapeSM.RoadSigns.SmallReflector'; meshes[5] = StaticMesh'MatthijsSM.Dike_Markers.Dike_Marker'; meshes[6] = StaticMesh'HumanLandscapeSM.FencePoles.ConcretePole'; meshes[7] = StaticMesh'HumanLandscapeSM.Fences.FenceHor1'; meshes[8] = StaticMesh'HumanLandscapeSM.Fences.FenceHor2'; meshes[9] = StaticMesh'MaartenWSM.Greenhouses.greenhouse_frontpiecex1_nofloor'; meshes[10] = StaticMesh'MaartenWSM.Greenhouses.greenhouse_corner_nofloor'; meshes[11] = StaticMesh'MatthijsSM.Nature.knotwilg'; meshes[12] = StaticMesh'MatthijsSM.Nature.knotwilg02'; meshes[13] = StaticMesh'SmitteyMesh.barriers.barrier'; meshes[14] = StaticMesh'MatthijsSM.Nature.riet_pluim'; meshes[15] = StaticMesh'MatthijsSM.Nature.riet_pluim_var'; // meshes[9] = StaticMesh'HumanLandscapeSM.Fences.16up1'; // meshes[10] = StaticMesh'HumanLandscapeSM.Fences.32up1'; // meshes[11] = StaticMesh'HumanLandscapeSM.Fences.64up1'; /// Reset: //attacher = Spawn(class'ActorAttacher'); //count = 0; /// Only works with dynamicmeshactors only now!!! foreach AllActors( class 'DynamicMeshActor', A) { classname = StripClass(A.class); //if (classname == "StaticMeshActor" || classname == "Mover") //{ /// Is the actor inside our failure? if (Encompasses(A, true)) { found = false; for (i = 0; i < meshes.length ; i++ ) { if (A.StaticMesh == meshes[i]) { found = true; break; } } if (found) { /// Start position a little bit upwards. start = (vect(0,0,1)*128)+A.Location; /// Okay, looks like it. Continue and cast a ray down: target = None; foreach TraceActors ( class'Actor', temp, HitLocation,HitNormal,vect(0,0,-1)*180+A.Location, start) { if (temp.IsA('Mover')) { target = temp; } } // target = A.Trace( HitLocation,HitNormal,vect(0,0,-1)*180+A.Location, start,); if (target != None) { /// Attach: A.bHardAttach = true; A.AttachTag = target.name; A.SetBase(target, vect(0,0,1)); //new method using attacher object: //if (count < 8) //{ //attacher = Spawn(class'ActorAttacher'); //count = 0; //} //attacher.ActorName[count] = A; //if (instr(target.tag, 'Slide') > 0) //{ //attacher.MoverName = Mover(target); //} //attacher.init(); //log(count @ " - " @ A.StaticMesh @ " - " @ target.StaticMesh @ " - " @ target.tag); //count++; //} //Log(classname @ " -> " @ A @ " " @ A.StaticMesh @ " is inside " @ self @ " and hits " @ target @ " - NOW attached - " @ target.StaticMesh @ " - " @ target.tag @ " hidden? " @ target.bHidden @ " name: " @ target.name); } } } //} } } /// Strip classname so we only get the actual name, minus the package. function string StripClass(class str) { local int p; local string s; p = InStr(str, ".") + 1; s = Mid(str, p); return s; } defaultproperties { /// Solves brightness mismatch in nearly all cases. (Was 12) /// This value can be overriden in Geosimulator.int AmbientGlow=12 bEdShouldSnap=True bStatic=False bCollideActors=True bBlockActors=True bBlockPlayers=True bBlockKarma=True bWorldGeometry=True CollisionHeight=+000001.000000 CollisionRadius=+000001.000000 bAcceptsProjectors=True LocationName="Damage Zone" bReported=false bDetected=false bIsSetStable=false LeveeType=LT_PrimaryLevee CurrentState=STA_NONE NL_FailureName="NL General Failure" EN_FailureName="General Failure" CurrentRedMarker = none; StaticMesh=StaticMesh'PrimDikeSM.Base.PrimDike32Straight' DrawScale=1.0 DrawScale3D=(X=1.0,Y=1.0,Z=1.0) DrawType=DT_StaticMesh /// Default to none: Mechanism=FM_None; ConfiguredFailure = LeveeNone; speedfactor = 1 }