Moving units towards diference between angles does not works

Klein~

TH.net Regular
Reaction score
0
When the dummy walks to the bottom left, even if it reachs the limits of the map it keep going to the bottom left edge. I tried to aim it to an angle like 135, the dummy should go to the top left, but it go to lower edge somehow. The other part of the map makes the dummies go to top even if it's aimed to go to bottom.

Look at the pictures.
 

Attachments

  • 1.png
    1.png
    1.3 MB · Views: 304
  • 2.png
    2.png
    1.4 MB · Views: 307

Xan_Kriegor

I can change this now in User CP.
Reaction score
12
What angle is it exactly you want the unit to move in? Also, what is the trigger math that leads to this? It's harder to help without knowing exactly what the issue is.

What it looks like to me is that Cenarius is being pushed in Kael's direction, and because they're standing right next to each other when Cenarius gets moved it pushes him around Kael (because otherwise it's trying to push through him which doesn't work). Could you clarify a little more what you want to happen?
 

Klein~

TH.net Regular
Reaction score
0
Sure.
Deafening Blas is a spell from DotA mod of WC3. The spell is basically one dummy unit like the one in the pictures above that pushes the units when touch them. The units move backward the touch angle, so, if the dummy is moving in 90º angle and touchs one unit, let's assume the angle between dummy and this unit is 60º, this unit will be moved to 60º direction. This isn't working on my map because, somehow, depending on the map coordinate of the dummy, this last will pushes the unit to a diferent angle.

Trigger:
  • ArcaneDemolition1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Deafening Blast
    • Actions
      • Unit - Create 1 DummyDefeaningBlast for (Triggering player) at (Position of (Triggering unit)) facing (Angle from (Position of (Triggering unit)) to (Target point of ability being cast)) degrees
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit Group - Add (Last created unit) to ArcaneDefeaningBlast

Trigger:
  • ArcaneDemolition2
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in ArcaneDefeaningBlast and do (Actions)
        • Loop - Actions
          • Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by 15.00 towards (Facing of (Picked unit)) degrees)
          • Unit Group - Pick every unit in (Units within 150.00 of (Position of (Picked unit)) matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True))) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is in PauseFrostGroup) Equal to True
                • Then - Actions
                  • Do nothing
                • Else - Actions
                  • Hashtable - Save 45.00 as 4 of (Key (Picked unit)) in GlobalHashtable
                  • Hashtable - Save (Angle from (Position of (Triggering unit)) to (Position of (Picked unit))) as 5 of (Key (Picked unit)) in GlobalHashtable
                  • Unit Group - Add (Picked unit) to DefeaningGroup
                  • Hashtable - Save 0.50 as 3 of (Key (Picked unit)) in GlobalHashtable
                  • Unit Group - Add (Picked unit) to PauseFrostGroup

Trigger:
  • ArcaneDemolition3
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in DefeaningGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Load 4 of (Key (Picked unit)) from GlobalHashtable) Less than or equal to 0.00
            • Then - Actions
              • Unit Group - Remove (Picked unit) from DefeaningGroup
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Load 4 of (Key (Picked unit)) from GlobalHashtable) Less than or equal to 13.00
                • Then - Actions
                  • Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by ((Load 4 of (Key (Picked unit)) from GlobalHashtable) + 2.00) towards (Load 5 of (Key (Picked unit)) from GlobalHashtable) degrees)
                  • Hashtable - Save ((Load 4 of (Key (Picked unit)) from GlobalHashtable) - 1.00) as 4 of (Key (Picked unit)) in GlobalHashtable
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Load 4 of (Key (Picked unit)) from GlobalHashtable) Less than or equal to 30.00
                    • Then - Actions
                      • Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by ((Load 4 of (Key (Picked unit)) from GlobalHashtable) + 2.00) towards (Load 5 of (Key (Picked unit)) from GlobalHashtable) degrees)
                      • Hashtable - Save ((Load 4 of (Key (Picked unit)) from GlobalHashtable) - 2.00) as 4 of (Key (Picked unit)) in GlobalHashtable
                    • Else - Actions
                      • Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by ((Load 4 of (Key (Picked unit)) from GlobalHashtable) + 2.00) towards (Load 5 of (Key (Picked unit)) from GlobalHashtable) degrees)
                      • Hashtable - Save ((Load 4 of (Key (Picked unit)) from GlobalHashtable) - 4.00) as 4 of (Key (Picked unit)) in GlobalHashtable
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top