// // CPT operator / SondeerGame // This source file is (c) by Deltares. // - October 2014 // class SondeerLocation extends Actor placeable; #exec OBJ LOAD FILE=SondeerMeester2.usx #exec OBJ LOAD FILE=ArnesEnvironmentT.utx var(Sondeer) int Radius; var(Sondeer) string LocationName; /// jln - 16-09-2008 File to use for the actual sonderen var(Sondeer) string SondeerFile; var array data; var DynamicMeshActor dma; function PreBeginPlay () { //local vector v; local int i; local int lines; /// Set default if necessary: if (Len(SondeerFile) == 0) { Log("[NOTICE]" @ self @ " is using a default sondering!"); SondeerFile = "SonderingDefault"; } lines = int(Localize("Sondering1", "linecount" , SondeerFile)); /// Read sondeer data: for (i = 0; i < lines; i++) { data.insert(0,1); data[0] = Localize("Sondering1", "line" $ i , SondeerFile); } Log("Read files, array size: " @ data.Length); /// Spawn and reset location again to properly align the mesh to the object: dma = Spawn(class'DynamicMeshActor', self, , self.location, self.rotation); dma.bCollideWorld = false; dma.SetDrawScale( DrawScale ); dma.SetLocation(self.location); dma.AttachTag = self.tag; } function Inside(Actor a) { } /// Alter mesh to reflect new state. function SetState(int newstate) { switch (newstate) { /// closed case 0: dma.SetStaticMesh(StaticMesh'sondeermeester2.voorgraven_dicht'); dma.Skins[0] = Skins[0]; break; /// open case 1: dma.SetStaticMesh(None); break; /// filled: case 2: dma.SetStaticMesh(StaticMesh'sondeermeester2.voorgraven_hoop'); dma.Skins[0] = Skins[0]; break; /// filled, sand: case 3: dma.SetStaticMesh(StaticMesh'sondeermeester2.voorgraven_hoop'); dma.Skins[0] = Texture'ArnesEnvironmentT.Other.DirtPile'; break; } dma.SetCollision(false,false,false); } defaultproperties { DrawType=DT_StaticMesh StaticMesh=StaticMesh'sondeermeester2.voorgraven_gat' DrawScale=2 bCollideActors=True bBlockPlayers=false; }