Teleport to Base when using item (trigger)

The newbie

New Member
Reaction score
0
I looked around for this, cuz it's probably rather simple trigger. I guess this is how it starts:
Trigger:
  • Teleport
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Teleporter
    • Actions

The problem is that im not sure how to make this interruptable and not sure about the teleport effect as well. Problem is, if I use the "normal" teleport, the player will hafta choose where to teleport to. When he usese this item (which does nothing) I want him to teleport to *my point* over 5 seconds, if not damaged.

So I need actions: teleport effect, cancel if damaged (I could start a countdown, but I suppose there is an easier way? ;)

Thanks in advance
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
Use Starts the effect of an ability instead? and add a casting time :p

Edit: oh, if damaged?

Darn, could be a little harder...

Guess you'd have to make a trigger and add the event SomeHero is Damaged for each player
and check if theyre channeling that teleport and cancel it if so.
 

ZelNaga

New Member
Reaction score
5
Something like this I think?

Code:
Untitled Trigger 001
    Events
        Unit - A unit Uses an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to Teleporter
    Actions
        Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl
        Wait 5.00 seconds
        Unit - Move (Hero manipulating item) instantly to Temp_Point_A
        Special Effect - Destroy (Last created special effect)
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Teleporter
    • Actions
      • Set Cancelled[Player number of (Owner of (Triggering Unit))] = false
      • Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl
      • Wait 5.00 seconds
      • If (All conditions are true) then do (Then Actions) else do (Else Actions)
      • If (Cancelled[Player number of (Owner of (Triggering Unit))] equal to false)
      • Then - Actions
      • Unit - Move (Hero manipulating item) instantly to Temp_Point_A
      • Special Effect - Destroy (Last created special effect)
      • Else - Actions

(Modified from zel's trigger)
Then add another trigger like i said, that whenever a unit is damaged, set Cancelled[Player number of (Owner of (Triggering Unit))] = true
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top