VitalOverdose/RandomRelocator
by VitalOverdose ;
Part of Vital'sPMT
Overview
//============================================================================= // RandomRelocator By vitaloverdose, Feb 2006, http://www.Vitaloverdose.com // This is part of the 'Vitals Pro Mapping Tools' Mod // Full class list http://wiki.beyondunreal.com/wiki/Vital's_Pro_Mapping_Tools // Direct Download the Mod in zipped format Http://promappingtools.zapto.org //============================================================================= class RandomRelocator Extends triggers Placeable; Var Array <Actor> TpAct; Var () Bool BPlaySpawnEffect; Var () Float ReScanTime; Function PostBeginPlay() { If ((reScanTime<0.1) && (reScanTime>0)) { Destroy(); log("reScanTime must be > 0.1 not "$reScanTime); } ScanTpAct(); SetTimer(ReScanTime,True); } Function Timer() { ScanTpAct(); } simulated Function Touch( Actor Other) { local int pickedTport; if (tpact.length > 1) pickedTport = rand(tpact.length-1)+1; if ((other.isa('Pawn')) && (!other.isa('vehicle'))) TPort( tpact[pickedTport], pawn(other)); } Simulated Function ScanTpAct() { Local Actor FoundTelPoint; If ( TpAct.Length > 0 ) TpAct.Remove( 0,TpAct.Length ); foreach AllActors( Class'Actor' , FoundTelPoint, 'TP' ) { TpAct.Insert( 0,1 ); TpAct[0] = FoundTelPoint; } } Simulated Function TPort( Actor TelPoint,Pawn TPPawn) { TPPawn.SetLocation( TelPoint.Location); TPPawn.SetRotation( TelPoint.Rotation ); TPPawn.OldRotYaw = TPPawn.Rotation.Yaw; }
Related Topics
VitalOverdose/VehicleTeleporter
Discussion
Unknown: Cleaned up for you. Where is the Overview description? Isn't this essentially a Teleporter? Why not subclass Teleporter instead of Trigger?