• 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.

Storm Bolt Teleport

Status
Not open for further replies.

Nor

Nor

Level 3
Joined
Jun 30, 2013
Messages
50

I want to make my casting unit teleport to the back of target unit after the missile impact to the target unit



is it possible in GUI?


+Rep to those who can help me
 

Nor

Nor

Level 3
Joined
Jun 30, 2013
Messages
50
It is possible. If the missile is made throughtriggers then you don't need to have a damage detection system.
However if you're not using triggers then you need it.
http://www.hiveworkshop.com/forums/spells-569/gui-friendly-damage-detection-v1-2-1-a-149098/

I tried to make triggers but it just keep my casting unit in his position

It's best to trigger the whole spell. I already made the spell, but it stuns AoE. I easily remove the AoE stun and just stun target.

can you show me your trigger?
 
Level 18
Joined
May 11, 2012
Messages
2,103
  • Storm Bolt Start
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Storm Hammer
    • Actions
      • Set MaxIndexStormHammer = (MaxIndexStormHammer + 1)
      • Set StormHammer_TrigUnit[MaxIndexStormHammer] = (Triggering unit)
      • Set StormHammer_TargetUnit[MaxIndexStormHammer] = (Target unit of ability being cast)
      • Set TempPoint = (Position of StormHammer_TrigUnit[MaxIndexStormHammer])
      • Set TempPoint2 = (Position of StormHammer_TargetUnit[MaxIndexStormHammer])
      • Unit - Create 1 Dummy Storm Hammer for (Owner of StormHammer_TrigUnit[MaxIndexStormHammer]) at TempPoint facing TempPoint2
      • Set StormHammer_Dummy[MaxIndexStormHammer] = (Last created unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MaxIndexStormHammer Equal to 1
        • Then - Actions
          • Trigger - Turn on Storm Hammer Loop <gen>
        • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call RemoveLocation(udg_TempPoint2)
      • Custom script: set udg_TempPoint = null
      • Custom script: set udg_TempPoint2 = null
  • Storm Bolt Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer TempInt) from 1 to MaxIndexStormHammer, do (Actions)
        • Loop - Actions
          • Set TempPoint = (Position of StormHammer_Dummy[TempInt])
          • Set TempPoint2 = (Position of StormHammer_TargetUnit[TempInt])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between TempPoint and TempPoint2) Less than or equal to 75.00
            • Then - Actions
              • Unit - Kill StormHammer_Dummy[TempInt]
              • Unit - Remove StormHammer_Dummy[TempInt] from the game
              • Unit - Create 1 Dummy Caster for (Owner of StormHammer_TrigUnit[TempInt]) at TempPoint2 facing (Facing of StormHammer_TargetUnit[TempInt]) degrees
              • Set TempDummyUnit[1] = (Last created unit)
              • Unit - Add a 0.50 second Generic expiration timer to TempDummyUnit[1]
              • Unit - Add Dummy Storm Hammer to TempDummyUnit[1]
              • Unit - Set level of Dummy Storm Hammer for TempDummyUnit[1] to (Level of Storm Hammer for StormHammer_TrigUnit[TempInt])
              • Unit - Order TempDummyUnit[1] to Human Mountain King - Storm Bolt StormHammer_TargetUnit[TempInt]
              • Unit - Move StormHammer_TrigUnit[TempInt] instantly to TempPoint2, facing TempPoint2
              • Set StormHammer_TrigUnit[TempInt] = StormHammer_TrigUnit[MaxIndexStormHammer]
              • Set StormHammer_TrigUnit[MaxIndexStormHammer] = No unit
              • Set StormHammer_TargetUnit[TempInt] = StormHammer_TargetUnit[MaxIndexStormHammer]
              • Set StormHammer_TargetUnit[MaxIndexStormHammer] = No unit
              • Set StormHammer_Dummy[TempInt] = StormHammer_Dummy[MaxIndexStormHammer]
              • Set StormHammer_Dummy[MaxIndexStormHammer] = No unit
              • Set MaxIndexStormHammer = (MaxIndexStormHammer - 1)
            • Else - Actions
              • Set TempPoint3 = (TempPoint offset by 25.00 towards (Angle from TempPoint to TempPoint2) degrees)
              • Unit - Move StormHammer_Dummy[TempInt] instantly to TempPoint3, facing (Angle from TempPoint to TempPoint2) degrees
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • MaxIndexStormHammer Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
              • Custom script: call RemoveLocation(udg_TempPoint3)
              • Custom script: set udg_TempPoint3 = null
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Custom script: call RemoveLocation(udg_TempPoint2)
          • Custom script: set udg_TempPoint = null
          • Custom script: set udg_TempPoint2 = null
 
  • Like
Reactions: Nor

Nor

Nor

Level 3
Joined
Jun 30, 2013
Messages
50
  • Events - Unit starts the effect of ability
  • Condition - Triggering unit belongs to enemy of casting unit equal to True
  • Actions
  • Unit - Move casting unit to position of triggering unit, facing XXX degrees.
i consider not in back and i put some other triggers too
 

Nor

Nor

Level 3
Joined
Jun 30, 2013
Messages
50
  • Storm Bolt Start
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Storm Hammer
    • Actions
      • Set MaxIndexStormHammer = (MaxIndexStormHammer + 1)
      • Set StormHammer_TrigUnit[MaxIndexStormHammer] = (Triggering unit)
      • Set StormHammer_TargetUnit[MaxIndexStormHammer] = (Target unit of ability being cast)
      • Set TempPoint = (Position of StormHammer_TrigUnit[MaxIndexStormHammer])
      • Set TempPoint2 = (Position of StormHammer_TargetUnit[MaxIndexStormHammer])
      • Unit - Create 1 Dummy Storm Hammer for (Owner of StormHammer_TrigUnit[MaxIndexStormHammer]) at TempPoint facing TempPoint2
      • Set StormHammer_Dummy[MaxIndexStormHammer] = (Last created unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MaxIndexStormHammer Equal to 1
        • Then - Actions
          • Trigger - Turn on Storm Hammer Loop <gen>
        • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call RemoveLocation(udg_TempPoint2)
      • Custom script: set udg_TempPoint = null
      • Custom script: set udg_TempPoint2 = null
  • Storm Bolt Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer TempInt) from 1 to MaxIndexStormHammer, do (Actions)
        • Loop - Actions
          • Set TempPoint = (Position of StormHammer_Dummy[TempInt])
          • Set TempPoint2 = (Position of StormHammer_TargetUnit[TempInt])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between TempPoint and TempPoint2) Less than or equal to 75.00
            • Then - Actions
              • Unit - Kill StormHammer_Dummy[TempInt]
              • Unit - Remove StormHammer_Dummy[TempInt] from the game
              • Unit - Create 1 Dummy Caster for (Owner of StormHammer_TrigUnit[TempInt]) at TempPoint2 facing (Facing of StormHammer_TargetUnit[TempInt]) degrees
              • Set TempDummyUnit[1] = (Last created unit)
              • Unit - Add a 0.50 second Generic expiration timer to TempDummyUnit[1]
              • Unit - Add Dummy Storm Hammer to TempDummyUnit[1]
              • Unit - Set level of Dummy Storm Hammer for TempDummyUnit[1] to (Level of Storm Hammer for StormHammer_TrigUnit[TempInt])
              • Unit - Order TempDummyUnit[1] to Human Mountain King - Storm Bolt StormHammer_TargetUnit[TempInt]
              • Unit - Move StormHammer_TrigUnit[TempInt] instantly to TempPoint2, facing TempPoint2
              • Set StormHammer_TrigUnit[TempInt] = StormHammer_TrigUnit[MaxIndexStormHammer]
              • Set StormHammer_TrigUnit[MaxIndexStormHammer] = No unit
              • Set StormHammer_TargetUnit[TempInt] = StormHammer_TargetUnit[MaxIndexStormHammer]
              • Set StormHammer_TargetUnit[MaxIndexStormHammer] = No unit
              • Set StormHammer_Dummy[TempInt] = StormHammer_Dummy[MaxIndexStormHammer]
              • Set StormHammer_Dummy[MaxIndexStormHammer] = No unit
              • Set MaxIndexStormHammer = (MaxIndexStormHammer - 1)
            • Else - Actions
              • Set TempPoint3 = (TempPoint offset by 25.00 towards (Angle from TempPoint to TempPoint2) degrees)
              • Unit - Move StormHammer_Dummy[TempInt] instantly to TempPoint3, facing (Angle from TempPoint to TempPoint2) degrees
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • MaxIndexStormHammer Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
              • Custom script: call RemoveLocation(udg_TempPoint3)
              • Custom script: set udg_TempPoint3 = null
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Custom script: call RemoveLocation(udg_TempPoint2)
          • Custom script: set udg_TempPoint = null
          • Custom script: set udg_TempPoint2 = null

will try it in just 5 minutes, you will receive after i tested it.
 

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
  • Set StormHammer_TrigUnit[TempInt] = StormHammer_TrigUnit[MaxIndexStormHammer]
  • Set StormHammer_TrigUnit[MaxIndexStormHammer] = No unit
  • Set StormHammer_TargetUnit[TempInt] = StormHammer_TargetUnit[MaxIndexStormHammer]
  • Set StormHammer_TargetUnit[MaxIndexStormHammer] = No unit
  • Set StormHammer_Dummy[TempInt] = StormHammer_Dummy[MaxIndexStormHammer]
  • Set StormHammer_Dummy[MaxIndexStormHammer] = No unit
This may be the problem. If the other unit cast the same spell at the same time, then MaxIndexStormHammer will be change and therefore changing the unit. I think u dont need to set these variable again.
 
Level 13
Joined
Jan 30, 2012
Messages
1,298
this your problem
  • Set TempInt = (TempInt - 1)
you have to null it too
and here
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • MaxIndexStormHammer Equal to 0
    • Then - Actions
      • Trigger - Turn off (This trigger)
    • Else - Actions
you have to put it outside the loop

your
  • Else - Actions
    • Set TempPoint3 = (TempPoint offset by 25.00 towards (Angle from TempPoint to TempPoint2) degrees)
    • Unit - Move StormHammer_Dummy[TempInt] instantly to TempPoint3, facing (Angle from TempPoint to TempPoint2) degrees
must in outside the ITE not inside
 
Level 20
Joined
Jun 27, 2011
Messages
1,864
this your problem
  • Set TempInt = (TempInt - 1)
you have to null it too
Where did you get that?

and here
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • MaxIndexStormHammer Equal to 0
    • Then - Actions
      • Trigger - Turn off (This trigger)
    • Else - Actions
you have to put it outside the loop
No need.

your
  • Else - Actions
    • Set TempPoint3 = (TempPoint offset by 25.00 towards (Angle from TempPoint to TempPoint2) degrees)
    • Unit - Move StormHammer_Dummy[TempInt] instantly to TempPoint3, facing (Angle from TempPoint to TempPoint2) degrees
must in outside the ITE not inside
Uh, it's in the Else part. Else means opposite, so uh you probably didn't get ITEs.
 
Level 13
Joined
Jan 30, 2012
Messages
1,298
Level 7
Joined
Dec 28, 2009
Messages
257
Derp, is it just me, or could you just use Starts the effect of an ability with Storm Bolt and move the casting unit behind the target unit?

I just checked this topic and thought the same, have one trigger that begins when unit casts spell, it activates other trigger which checks every 0.05 seconds whether target unit has got buff (probably buff "Stunned/Pause, id change it so something custom) and then set some point behind the unit (facing angle -180?) and move unit there..

Or i dunno, i like making things easy, ignore me, my triggers tend to bug :D
 
Level 8
Joined
Oct 12, 2011
Messages
483
I just mean one trigger:
  • Storm Bolt Teleport
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Storm Bolt
    • Actions
      • Set p_temp = (Position of (Triggering unit))
      • Set p_temp = (p_temp offset by 100.00 towards ((Facing of (Triggering unit)) + 180.00) degrees)
      • Unit - Move (Casting unit) instantly to p_temp_2
      • Custom script: call RemoveLocation(udg_p_temp)
      • Custom script: call RemoveLocation(udg_p_temp_2)
 
Level 11
Joined
Jun 15, 2011
Messages
447
Derp, is it just me, or could you just use Starts the effect of an ability with Storm Bolt and move the casting unit behind the target unit?

That'll make the casting unit move while it's just throwing the storm bolt missile.
What he wants is teleport the casting unit when the target is hit.

But I have an easier solution for you:
First: create a "channel" ability
Second: create a dummy unit with storm bolt model
Third: give that dummy unit a custom fireball ability with 100 cast range
Fourth: create 2 triggers

Trigger 1:
Events - A unit starts the effect of an ability
Conditions - Ability being cast Storm Bolt (Channel Based)
Actions -
Create 1 Storm Bolt (dummy) at etc etc
Order last created unit to fireball target unit of ability being cast

Trigger 2:
Events - A unit start the effect of an ability
Conditions - Ability being cast Fireball (Dummy)
Actions -
Kill casting unit
Pick every units own by owner of casting unit boolean is a hero etc
Move target unit of ability being cast to (variable of target unit's position)

That's easier.
 
Level 11
Joined
Jun 15, 2011
Messages
447
Hmm, so unit starts the effect of an ability before the projectile hits the target? o_O

Yes...
Once a unit "throws" the storm bolt, it's already "a unit starts the effect of an ability"

That's why he needs to use a dummy unit to act as the projectile, and once that dummy hits the target with a 100 range fireball ability, move the casting unit to the target unit's position.
 
Status
Not open for further replies.
Top