• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Teleport how i do

Status
Not open for further replies.
Level 6
Joined
Jul 25, 2005
Messages
221
That trigger is used for when a unit enters a region. Right? :p
A more fun way of doing this is

  • FunSpell
  • Events
  • Unit - A unit begins casting an ability
  • Conditions
  • Ability being cast = Your_ability_being_cast
  • Actions
  • Unit - Move(target unit of ability being cast) instantly to (Position of (SomeUnit/Building/Region etc.)
 
Level 6
Joined
Jul 25, 2005
Messages
221
Let me give you a simple scenario then :p

Your hero has a spell called "Evilness Spell" which moves the unit 250 yds away from its original position, oppsite of where your hero is standing of course, it would look like this

  • Kickassultimaherospell
  • Events
  • Unit - A unit begins casting an ability
  • Conditions
  • Ability being cast = Evilness Spell
  • Actions
  • Set TargetUnitOfAbilityBeingCast(...) = (Target unit of ability being cast)
  • Set intYardsTravelled = 0 //resetting >.<
  • Set CurrentLocationOfTarget = Position of (Target unit of ability being cast)
  • Set Degrees = (Angle from (Position of (Triggering unit)) to (Position of (Target unit of ability being cast)))
  • Special Effect - [insert fancy dancy mancy effect here]
  • Trigger - Turn on Ultimamovenesstrigger
  • Ultimamovenesstrigger
  • Events
  • Time - Every 0.02 seconds of game time
  • Conditions
  • Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • intYardsTravelled = 251
  • Then - Actions
  • Trigger - Turn off (This Trigger)
  • Skip remaning actions
  • Else - Actions
  • Set intYardsTravelled = intYardsTravelled + 1
  • Unit - Move TargetUnitOfAbilityBeingCast instantly to ((CurrentLocationOfTarget) offset by intYardsTravelled towards Degrees)
something like that, a little rough but you get the picture >.<
 
Status
Not open for further replies.
Top