Hello, everyone
I am trying to make a teleport system, which can create an entrance and an exit, whenever a unit walk into the entrance, the unit will be teleport to the exit. Both the teleport gate will exist until a new gate has been created.
Therefore I created some ability and trigger to do the work:
Abilities:
1.Gate of Parallel Universe (Entrance): to create the entrance.
2.Gate of Parallel Universe (Exit): to create the exit.
Variables:
1.GPU_Enter_Point (variable type: point)
2.GPU_Exit_Point (variable type: point)
3.GPU_Boolean (variable type: boolean)
Triggers:
1.Gate of Parallel Universe Set Enter:
(1)When a unit casted the spell to create the entrance, set GPU_Enter_Point equal to the target point of ability being cast.
(2)If the ability has been cast more than once, remove the old entrance gate.
(3)Add to trigger(Gate of Parallel Universe Loop) the event(A unit enters GPU_Enter_Point).
2.Gate of Parallel Universe Set Exit:
When a unit casted the spell to create the exit, set GPU_Exit_Point equal to the target point of ability being cast. If the ability has been cast more than once, remove the old exit gate.
3.Gate of Parallel Universe Loop:
(1)Create special effects.
(2)Move the entering unit instantly to GPU_Exit_Point.
But now I have a problem, for exsample, I create an entrance at location A, and an exit at location B, then I create another entrance at location C, the first entrance will be removed since the new entrance are created, but when unit move pass the location A, it will still be teleported to location B.
I tried two ways to fix this problems, but both way dose not work:
1.Use a custom script to remove the GPU_Enter_Point everytime a unit casted the spell to create an entrance.
2.Use a custom script to destroy the Gate of Parallel Universe Loop, so after I create a new entrance, the old entance will stop teleporting units, but the new entrance dose not work too.
Please help me to finish this work, many thanks!
I am trying to make a teleport system, which can create an entrance and an exit, whenever a unit walk into the entrance, the unit will be teleport to the exit. Both the teleport gate will exist until a new gate has been created.
Therefore I created some ability and trigger to do the work:
Abilities:
1.Gate of Parallel Universe (Entrance): to create the entrance.
2.Gate of Parallel Universe (Exit): to create the exit.
Variables:
1.GPU_Enter_Point (variable type: point)
2.GPU_Exit_Point (variable type: point)
3.GPU_Boolean (variable type: boolean)
Triggers:
1.Gate of Parallel Universe Set Enter:
(1)When a unit casted the spell to create the entrance, set GPU_Enter_Point equal to the target point of ability being cast.
(2)If the ability has been cast more than once, remove the old entrance gate.
(3)Add to trigger(Gate of Parallel Universe Loop) the event(A unit enters GPU_Enter_Point).
2.Gate of Parallel Universe Set Exit:
When a unit casted the spell to create the exit, set GPU_Exit_Point equal to the target point of ability being cast. If the ability has been cast more than once, remove the old exit gate.
3.Gate of Parallel Universe Loop:
(1)Create special effects.
(2)Move the entering unit instantly to GPU_Exit_Point.
But now I have a problem, for exsample, I create an entrance at location A, and an exit at location B, then I create another entrance at location C, the first entrance will be removed since the new entrance are created, but when unit move pass the location A, it will still be teleported to location B.
1.Use a custom script to remove the GPU_Enter_Point everytime a unit casted the spell to create an entrance.
2.Use a custom script to destroy the Gate of Parallel Universe Loop, so after I create a new entrance, the old entance will stop teleporting units, but the new entrance dose not work too.
Please help me to finish this work, many thanks!
Attachments
Last edited: