UnrealScript Tips

UScript Tutorials

« Back

Teleporting Players Between Zones Automatically (Timer-based)



This script allows you to instantly teleport the player between two or more zones automatically (on a looping/timed basis).

Configurable teleportation effects include a fully-opaque screen flash and randomised sound effects.

Instructions

If you use this script in your map please spread the love by leaving a visible credit to BunnyTrack.net in the map.

  1. Import the script into your map (ideally into MyLevel)
  2. Place an instance of the `ZoneShifter -> ZoneShiftTimer` actor anywhere in your map. Its location doesn't matter.
  3. Place two or more `Info -> ZoneInfo -> ZoneShiftZone` actors in the map; one in each of the rooms (zones) between which players will be teleported.

    The location of these two actors is critical. They act as reference points for the location of the players as they are teleported between each zone. If you're teleporting players between very similar rooms then each actor must be placed in exactly the same position within each room. Use the `Movement -> Location -> X/Y/Z` properties to align the actors as precisely as possible.

  4. Give each of the ZoneShiftActors a unique `Tag`.
  5. Insert those tags into the main `ZoneShiftTimer` actor's ZoneShiftZoneTags property. Example:

    ZoneShiftTimer -> ZoneShiftTags -> 
    	[0] -> SpringZone
    	[1] -> SummerZone
    	[2] -> AutumnZone
    	[3] -> WinterZone

    Also configure the timer's frequency in seconds:

    ZoneShiftTimer -> TimerFrequency
  6. Optionally connect the `ZoneShiftZone` actors to the `ZoneShiftTimer` actor by setting their `Event` tags to the timer's `Tag`. This step is not necessary but it does make UnrealEd draw a nice red line between the actors, connecting them visually.

In the following example, the player will be teleported through each of the four zones (spring/summer/autumn/winter), with the zone changing every two seconds:

See also: Triggering Events by Shooting into a Zone