How to create a Town Portal
In my last rpg map, there were great distances between the battleground and a revive stone, it always annoyed me walking the whole distance. So I wondered if you could make a Town Portal System/ Trigger like in DiabloI+II, I read a lot of Threads on different sites, but never found someone who did exactly what I was planning to do.
So after some tries, here is my result:
1. First of all I made an Item called Townportal
2. I made two trigger, the first is for opening the potal in the level
Please correct me if I´m wrong or if you got a better way to realize it.
In my last rpg map, there were great distances between the battleground and a revive stone, it always annoyed me walking the whole distance. So I wondered if you could make a Town Portal System/ Trigger like in DiabloI+II, I read a lot of Threads on different sites, but never found someone who did exactly what I was planning to do.
So after some tries, here is my result:
1. First of all I made an Item called Townportal
2. I made two trigger, the first is for opening the potal in the level
-
TP
-
Events
- Unit - A unit owned by Player 1 (Red) Uses an item
-
Conditions
- (Item-type of (Item being manipulated)) Equal to Stadtportal
- ((Triggering unit) is A Hero) Equal to True
-
Actions
- Unit - Create 1 Portal for Neutral Passive at (Position of (Triggering unit)) facing Default building facing (270.0) degrees
- Set Location[1] = (Position of (Last created unit))
- Set Port[1] = (Last created unit)
- Wait 0.10 seconds
- Unit - Move (Triggering unit) instantly to (Center of Gebiet 001 <gen>)
- Camera - Pan camera for Player 1 (Red) to (Position of (Triggering unit)) over 0.00 seconds
- Unit - Create 1 Portal for Neutral Passive at (Center of Gebiet 001 <gen>) facing Default building facing (270.0) degrees
- Set Port[2] = (Last created unit)
-
Events
-
TP 1
-
Events
- Unit - A unit enters Gebiet 002 <gen>
-
Conditions
- (Unit-type of (Last created unit)) Equal to Portal
- ((Triggering unit) is A Hero) Equal to True
-
Actions
- Unit - Move (Triggering unit) instantly to Location[1]
- Camera - Pan camera for Player 1 (Red) to (Position of (Triggering unit)) over 0.00 seconds
- Unit - Remove Port[1] from the game
- Unit - Remove Port[2] from the game
-
Events
Please correct me if I´m wrong or if you got a better way to realize it.