Gah - a solution with more questions. – EntropicLqd

User:Crusha/UltimateMappingTools/VehicleTeleporter

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT2004 Object >> Actor >> NavigationPoint >> SmallNavigationPoint >> Teleporter >> VehicleTeleporter (custom)
Package: 
UltimateMappingTools

VehicleTeleporter v1.0 by KillBait!


A Teleporter that can be used by players AND vehicles. Works with bots too. Tested on a dedicated (v3339) server and it runs O.K.

Goals

The aim was to have a teleport that was usable by both vehicles and players, and still used the normal teleporter functions, to make it as easy as possible for LD's to use, and required no extra work on server admins for them to support these new features.


Usage Restrictions

You are Free to use this actor in whatever type of Map/Mod/TC you want, BUT, please do not rip out/remove the notes and comments. I have learned a lot from looking at other peoples code, and i want to keep it here for others to look at. Maybe, even with my newbie coding skills, it will be of help to somebody.


Credits

- ROBO (UT2004ModList) Came up with the original SetPhysics workaround

- Derek "HoMeRS}i{MpSoN" Altamirano for the hint on the velocity multipler code.

- Steve Polge for the suggestion to widen the reachspec collision, stops bots bailing out just before teleporting, because they could not find a wide enough path.

- UnrealWiki for it's invaluable documentation of some fuctions i've never used before this.

- All other Code/bugs by Me (KillBait!)


Properties

Property group 'VehicleTeleporter'

bGroundVehiclesOnly

Type: bool

The teleporter won't work on flying vehicles.

bTeleportVehiclesOnly

Type: bool

No players are teleported.

Internal variables

bKeepFlyingUpright

Type: bool

For some reason is bKStayUpright set to False for vehicles that are teleported, but that would render any flying vehicle really unstable, so we remember the value and set it back afterwards.

ReachSpecCollHeight

Type: int

Changes the collision height of the destination path to this. So bots don't bail.

ReachSpecCollRadius

Type: int

Changes the collision radius of the destination path to this. So bots don't bail.

Functions

Events

Accept

simulated event bool Accept (Actor Incoming, Actor Source)

Overrides: Teleporter.Accept


PostBeginPlay

event PostBeginPlay ()

Overrides: Teleporter.PostBeginPlay


PostTouch

simulated event PostTouch (Actor Other)

Overrides: Teleporter.PostTouch


SpecialCost

event int SpecialCost (Pawn Other, ReachSpec Path)

Overrides: Teleporter.SpecialCost


SpecialHandling

event Actor SpecialHandling (Pawn Other)

Overrides: Teleporter.SpecialHandling


Touch

event Touch (Actor Other)

Overrides: Teleporter.Touch


Other instance functions

ClearDest

function ClearDest (Actor Incoming, Actor Source)