How do i make my dummy unit move further than (Target point of ability being cast)?

HybriD

New Member
Reaction score
1
I've gotten what I'd like to think is a rather simple problem here. I've made a spell, which works sort of like the Frozen Orb spell from Diablo 2. The only problem I'm having is my dummy unit stopping after reaching the targeted point of the ability being thrown.
What I would like for it to do, is continue in the direction of the targeted point, until it eventually dies out, like shockwave.

Trigger:
  • Frozen Orb
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Frozen Orb
    • Actions
      • Unit - Create 1 Dummy(FrozenOrb) for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
      • Unit - Add a 2.50 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Move To (Target point of ability being cast)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Frozen Orb for (Triggering unit)) Equal to 1
        • Then - Actions
          • Unit - Add Ice Shards to (Last created unit)
          • Unit - Set level of Ice Shards for (Last created unit) to 1
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Frozen Orb for (Triggering unit)) Equal to 2
            • Then - Actions
              • Unit - Add Ice Shards to (Last created unit)
              • Unit - Set level of Ice Shards for (Last created unit) to 2
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Frozen Orb for (Triggering unit)) Equal to 3
                • Then - Actions
                  • Unit - Add Ice Shards to (Last created unit)
                  • Unit - Set level of Ice Shards for (Last created unit) to 3
                • Else - Actions
                  • Do nothing
          • Do nothing


Help would be very appreciated =]
 

Tyrulan

Ultra Cool Member
Reaction score
37
Replace this with the following: Simple. :) Use Point with Polar Offset.

This>>

Trigger:
  • Unit - Order (Last created unit) to Move To (Target point of ability being cast)


To this>>

Trigger:
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Unit - Order (Picked unit) to Move To ((Target point of ability being cast) offset by 400.00 towards (Angle from (Position of (Triggering unit)) to (Target point of ability being cast)) degrees)


The only problem with this is that the spell will always go 400 beyond the target even if you cast from 50 pixels away or from 600 pixels. To fix this you can say something like so:

Trigger:
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Unit - Order (Picked unit) to Move To ((Center of (Playable map area)) offset by (1000.00 - (Distance between (Position of (Triggering unit)) and (Target point of ability being cast))) towards (Angle from (Position of (Triggering unit)) to (Target point of ability being cast)) degrees)


So if you're max casting range is 600, it will work like 1000 - 600 is 400 pixels beyond the target. However if you cast at 200 range, it will work with 1000 - 200 is 800 pixels beyond your target. Basically whatever you put in for the (X - Y), X will be the distance travelled by your dummy unit. Good luck mate. :)
 

HybriD

New Member
Reaction score
1
Trigger:
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Unit - Order (Picked unit) to Move To ((Target point of ability being cast) offset by 400.00 towards (Angle from (Position of (Triggering unit)) to (Target point of ability being cast)) degrees)

Thanks a lot! The "Angle from point to point" was exactly what i was looking for =]
 

Tyrulan

Ultra Cool Member
Reaction score
37
No problem at all. :) You may or may not want to consider using distance between points for the "offset."
 
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