UndeadDragon
Super Moderator
- Reaction score
- 447
Introduction
"Teleports" can be used to make units instantly travel from one location to another. Teleports are often used in RPG games to move the player to somewhere new, or to go backwards.
The Triggers
There are a few different types of teleports that can be made I will go through a couple of them.
Style 1 - Simple Instant Teleport
This is very simple to make it only needs one trigger.
First make a region where you want the teleport to be. Then use the very simple following trigger:
Change the "(Player 1 (Red) start location)" to wherever you want to teleport to.
You could also make the camera move to the new location by adding this:
Style 2 - A teleport that let's through certain units.
This will allow certain units through but for others it will do nothing.
This also only needs one region (the teleport) and one trigger.
Here is what the trigger is:
This will allow all units through the teleport apart from wisps, where it will do nothing. If you want the teleport to allow only one unit you can switch round the "Then" and "Else" actions, this will mean that if it is a wisp it will move it instantly to your location and if it is anything else it will do nothing.
Extra
You could add text to the region to tell you where you want to go with this other trigger:
You can also add effects to the teleport. Adding effects will make your teleport look much better than the unit just disappearing and reappearing onto your different locations. Heres a trigger to make an effect for when you walk onto the teleport area:
Special Effect - Create a special effect at (Center of To Town <gen>) using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl[/CODE]
You may want a teleport that will place you in a random position on the map, the trigger for theat is very simple:
Enter Teleport
Thanks for reading my first Tutorial, please comment on this, I can handle it
"Teleports" can be used to make units instantly travel from one location to another. Teleports are often used in RPG games to move the player to somewhere new, or to go backwards.
The Triggers
There are a few different types of teleports that can be made I will go through a couple of them.
Style 1 - Simple Instant Teleport
This is very simple to make it only needs one trigger.
First make a region where you want the teleport to be. Then use the very simple following trigger:
Code:
Enter Teleport
Events
Unit - A unit enters To Town <gen>
Conditions
Actions
Unit - Move (Triggering unit) instantly to (Player 1 (Red) start location)
Change the "(Player 1 (Red) start location)" to wherever you want to teleport to.
You could also make the camera move to the new location by adding this:
Code:
Camera - Pan camera for (Owner of (Triggering unit)) to (Player 1(Red) start location) over 1.00 seconds
Style 2 - A teleport that let's through certain units.
This will allow certain units through but for others it will do nothing.
This also only needs one region (the teleport) and one trigger.
Here is what the trigger is:
Code:
Enter Teleport
Events
Unit - A unit enters To Town <gen>
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Triggering unit)) Equal to Wisp
Then - Actions
Do nothing
Else - Actions
Unit - Move (Triggering unit) instantly to (Player 1 (Red) start location)
Camera - Pan camera for (Owner of (Triggering unit)) to (Player 1 (Red) start location) over 1.00 seconds
Extra
You could add text to the region to tell you where you want to go with this other trigger:
Code:
To Town
Events
Time - Elapsed game time is 1.00 seconds
Conditions
Actions
Floating Text - Create floating text that reads To Town at (Center of To Town <gen>) with Z offset 0.00, using font size 12.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Floating Text - Show (Last created floating text) for (All players)
You can also add effects to the teleport. Adding effects will make your teleport look much better than the unit just disappearing and reappearing onto your different locations. Heres a trigger to make an effect for when you walk onto the teleport area:
Code:
Enter Teleport
Events
Unit - A unit enters To Town <gen>
Conditions
Actions
Unit - Move (Triggering unit) instantly to (Player 1 (Red) start location)
You may want a teleport that will place you in a random position on the map, the trigger for theat is very simple:
Enter Teleport
Code:
Events
Unit - A unit enters To Town <gen>
Conditions
Actions
Unit - Move (Triggering unit) instantly to (Random point in (Playable map area))
Thanks for reading my first Tutorial, please comment on this, I can handle it