| Home Page | Recent Changes

VitalOverdose/RandomRelocator

UT2004 :: Actor >> Trigger >> RandomRelocator (Package: custom) - works online.
 

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

VitalOverdose/RandomRelocator

 

Discussion

Unknown: Cleaned up for you. Where is the Overview description? Isn't this essentially a Teleporter? Why not subclass Teleporter instead of Trigger?


Category Custom Class

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Recent Changes

Offline Wiki

Unreal Engine

Console Commands

Terminology

FAQs

Help Desk

Mapping Topics

Mapping Lessons

UnrealEd Interface

UnrealScript Topics

UnrealScript Lessons

Making Mods

Class Tree

Modeling Topics

Chongqing Page

Log In