// 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. //============================================================================= // This MARKER is summoned in the game to mark a volume with a possible failure // It will also be responsible for the report // It will be visible when player put it there // ------------------------------------------------------------ // Created by Rui Guimaraes // © 2006, Geodelft // // 2006-08-17 The Formatted and initialized Mechanism // 2006-09-13 gui Corrected problem of having several markers close by // And optimized calling of funtions (no longer using Command // Console command on Touch and UnTouch) //============================================================================= class RedMarker extends Marker placeable; //CHANGE FOR STATIC MESH WE WANT #exec OBJ LOAD FILE=GeoGamePlay.usx var bool bReported; var bool bActionCenterCalled; // Meaning:If the player has called for this marker. Effect: You can't destroy marker anymore. var localized string MarkerName; // String with message to appear as marker name //var Volume Volume; // If marker is in a damaged volume (is set by the players volume when marker is summoned) var LeveeTile LTile; /// If the marker is placed inside/on a Levee tile place. var Measure MeasureTaken; var array Signals; // the Signals reported at this marker (in order of addition) var array SignalOriginals; // for every Signal reported at this marker, this array contains the last report // of that signal that was CREATED (so not edited) Be it the first observation or a later report. // This is used to see if changes are made after editing the report (multiple times). var array ConvState; // a history of the conversations that the player had with the Action Center // when calling from this marker (needed for score calculation, a.o.) /// 2007-10-12 Jln Using global enums var GeoEnums.FailingMechanisms Mechanism; var struct GlobalLocations { var LocationNameSign LocationSign; var float TopDistance; var float LeftDistance; } GlobalLocation; function CheckLocationSign(vector TempLoc) { local bool FirstSign; local actor A; local float TempDist; // CHECK THE CLOSEST LOCATION SIGN FirstSign = true; foreach DynamicActors( class 'Actor', A, 'LocationNameSign') if((TempDist > Abs(VSize(TempLoc - A.Location))) || FirstSign) { GlobalLocation.LocationSign=LocationNameSign(A); TempDist = Abs(VSize(TempLoc - A.Location)); FirstSign = false; } } function PostBeginPlay() { Super.PostBeginPlay(); } function Touch(Actor Other) { Super.Touch(Other); if ( GeoPlayerController(Pawn(Other).Controller) != None) { GeoPlayerController(Pawn(Other).Controller).NearMarker(self, true); } } function UnTouch(Actor Other) { Super.UnTouch(Other); if ( GeoPlayerController(Pawn(Other).Controller) != None) { GeoPlayerController(Pawn(Other).Controller).AwayFromMarker(self, true); } } //============================================================================= // Executed from MenuSignalQuestions directly after the NewSignal from // GeoPlayerController is saved to this marker. This function copies that // Signal into the SignalOriginals-array, because it was a newly created one. //============================================================================= // Date Id Modification // 2007-07-06 Wsl Created function //============================================================================= function SaveSignalOriginal(int signalIndex) { log(""); log("==== SAVESIGNALORIGINAL ===="); if(SignalOriginals.length < Signals.length) { SignalOriginals.length = Signals.length; log("set SignalOriginals.length to "$SignalOriginals.length); } // do not put the reference to the Signal in SignalOriginals, but // a separate Signal object which is a complete duplicate SignalOriginals[signalIndex] = Signals[signalIndex].Duplicate(); log(""); } //============================================================================= // Executed from MenuActionCenterStandard after switching to correcting state. // This function looks up where Signal s is in the Signals-array, then uses // SaveSignalOriginal to save it in the SignalOriginals. //============================================================================= // Date Id Modification // 2007-07-06 Wsl Created function //============================================================================= function SaveSignalOriginal2(Signal s) { local int i; while(i < Signals.length && Signals[i] != s) { i++; } if(i != Signals.length) { // s found in Signals at index i SaveSignalOriginal(i); } } defaultproperties { bReported=false bstatic=false bGameRelevant=true bBlockPlayers=false bUseCylinderCollision=true CollisionHeight=200.0 CollisionRadius=200.0 Mechanism = FM_None DrawScale=2.5 bTriggerOnceOnly=false Event=GeoPlayer //CHANGE FOR STATIC MESH WE WANT StaticMesh=StaticMesh'GeoGamePlay.Markers.RedMarker' DrawType=DT_StaticMesh bActionCenterCalled=false MarkerName="Damage Marker" Location={MapLocation=MAP_None; TopDistance=0; LeftDistance=0;} Begin Object Class=ConversationState Name=CState End Object ConvState=ConversationState'CState' }