The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall

Legacy:DelayedTeleporter

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 16:07, 18 November 2007 by Sweavo (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UT :: Actor (UT) >> NavigationPoint (UT) >> Teleporter >> DelayedTeleporter

This special Teleporter class deactivates for a short time after someone used it to prevent the bots from telefragging other players.

Properties[edit]

These properties can be found in the Teleporter group of the DelayedTeleporter's properties.

bool bFixedExitRotation 
Every player that exits this teleporter faces the direction of the teleporter instead. The player's previous rotation has no effect anymore. (like the YawTeleporter for UT)
float TeleportEnterDelay 
This specifies, how long the teleporter will be disabled after someone entered it.

Code[edit]

To use this actor, subclass Teleporter with the following code. This class has been tested offline only. See Create A Subclass and Embedding Code for how to use this script. Set bStatic to False and bNoDelete to True in the DelayedTeleporter's default properties.

Comments[edit]

Wormbo: I made this class after Snowdog mentioned he needed to add a delay to teleporters for one of his maps to prevent the bots from telefraging each other. I also added the YawTeleporter's functionality, so both features can be used at once.

Mychaeel: That functionality can be recreated with a simple trigger system too:

  • Have the Teleporter trigger a Dispatcher.
  • The Dispatcher's first action (at 0 seconds) triggers the Teleporter (to disable it).
  • The Dispatcher's second action (after the delay) triggers the Teleporter again (to re-enable it).

Wormbo: I didn't test your idea, Mychaeel, but I think it will have a little bug: You can use the first teleporter and quickly enter the second teleporter you just teleported to and keep standing in the first teleporter. Now when both teleporters have the same delay you constantly get teleported from one teleporter to the other and back again. (with the delay of course) I encountered this with my class too, that's why there's the LastIncoming variable.

ZxAnPhOrIaN: I don't know if this would work (because I know very little about unreal script), but the teleporters should deactivate when a player is in the teleporters collision cylinder, and then reactivate when no player is in the teleporters collision cylinder.

Wormbo: It's possible, but this would just attract lamers who would camp in the teleporter and block it. Just imagine you're on top of a Facing Worlds tower and there's a guided redeemer heading your way and you can't escape because someone blocks the exit of your teleporter...

ZxAnPhOrIaN: ...But here is the catch, there would be a variable that the mapper could designate so if there would be a person, like what you said with Facing Worlds, is in the collision cylinder for a sertain amount of time, it will activate. So it would be like this: 0 min. Person teleports. X min. Person still there. Y min. Teleporter activates. Z min. Someone telefrags the camper.

Wormbo: That sounds much better. I'll have a look at it. :)

ZxAnPhOrIaN: You should have an option for vertex fog too! Also you should have the teleporter renamed to EnhancedTeleporter. ;)

Wormbo: Vertex fog? EnhancedTeleporter? O_O

ZxAnPhOrIaN: Vertex fog is like the ZoneLight -> ViewFog. It is like falling off of the ledges of DM-Peak. Also Enhanced Teleporter would be a better name for the teleporter, it gives enhancements to the original teleporter.

Mychaeel: But there are a great many thinkable "enhancements" for a teleporter. "EnhancedTeleporter" strikes me as a too generic name. DelayedTeleporter is much better. (And I frankly don't understand yet where the vertex fog comes in.)

ZxAnPhOrIaN: When you teleport through the teleporter, your screen brightens and restores in 1 second. That is just eye candy!

Wormbo: Ah! You mean a ClientFlash, that's something different. A trigger would probably be a better class for this effect, because it could be used in other places as well.

ElBundee: I've got the strange feeling the Yaw settings of the UT2003 teleporter simply does nothing. Any news on the 2003 code?

Mychaeel: If you mean the bChangesYaw property: It rotates the incoming player by the Yaw difference between the source and the target teleporter. It does not set the player's Yaw to the target teleporter's.