• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Dummy won't cast impale

Status
Not open for further replies.
Level 18
Joined
May 11, 2012
Messages
2,103
Dummy Unit is properly set.
Dummy Shadow Impale has 0 cooldown, 0 manacost, 50 wave distance, 100 AoE, 99999 cast range.

Can anyone tell me WHAT THE **** is wrong in here?
Why won't it cast the impale on looping part of the code (TempPoint3)?
In the first part where it casts to TempPoint is fine, but when it has to cast in loops, it just won't.
I've put debug messages, and everything displays like like it's supposed to.
I've been screwing with this whole morning, and can't get it to work WHAT SO F***** EVER!

  • Shadow Impale
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shadow Impale
    • Actions
      • -------- ================================================ --------
      • Set TempTrigUnit = (Triggering unit)
      • Set TempPoint = (Position of TempTrigUnit)
      • Set TempPoint2 = (Target point of ability being cast)
      • Set TempReal = (Distance between TempPoint and TempPoint2)
      • Set TempInt2 = (Level of Shadow Impale for TempTrigUnit)
      • -------- ================================================ --------
      • Game - Display to (All players) the text: (Distance From TempPoint to TempPoint2: + (String(TempReal)))
      • Game - Display to (All players) the text: (Level of ability for TempTrigUnit: + (String(TempInt2)))
      • -------- ================================================ --------
      • Unit - Create 1 Dummy Shadow Impale for (Triggering player) at TempPoint facing Default building facing degrees
      • Set TempDummyUnit = (Last created unit)
      • -------- ================================================ --------
      • Unit - Add a 0.50 second Generic expiration timer to TempDummyUnit
      • Unit - Add Dummy Shadow Impale to TempDummyUnit
      • Unit - Set level of Dummy Shadow Impale for TempDummyUnit to TempInt2
      • Unit - Order TempDummyUnit to Undead Crypt Lord - Impale TempPoint
      • -------- ================================================ --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TempReal Less than (500.00 + ((Real(TempInt2)) x 100.00))
        • Then - Actions
          • Game - Display to (All players) the text: (Distance From TempPoint to TempPoint2 is less than: + (String(((TempInt2 x 100) + 500))))
          • Set TempInt3 = ((Integer(TempReal)) / 100)
          • Game - Display to (All players) the text: (TempInt3 is: + (String(((Integer(TempReal)) / 100))))
          • For each (Integer TempInt) from 1 to TempInt3, do (Actions)
            • Loop - Actions
              • -------- ================================================ --------
              • Set TempPoint3 = (TempPoint offset by (100.00 x (Real(TempInt))) towards (Angle from TempPoint to TempPoint2) degrees)
              • -------- ================================================ --------
              • Unit - Order TempDummyUnit to Undead Crypt Lord - Impale TempPoint3
              • -------- ================================================ --------
              • Custom script: call RemoveLocation(udg_TempPoint3)
              • Game - Display to (All players) the text: (TempPoint3 is located at: + (String((100.00 x (Real(TempInt))))))
        • Else - Actions
          • For each (Integer TempInt) from 1 to (5 + TempInt2), do (Actions)
            • Loop - Actions
              • -------- ================================================ --------
              • Set TempPoint3 = (TempPoint offset by (100.00 x (Real(TempInt))) towards (Angle from TempPoint to TempPoint2) degrees)
              • -------- ================================================ --------
              • Unit - Order TempDummyUnit to Undead Crypt Lord - Impale TempPoint3
              • -------- ================================================ --------
              • Custom script: call RemoveLocation(udg_TempPoint3)
              • Game - Display to (All players) the text: (TempPoint3 is located at: + (String((100.00 x (Real(TempInt))))))
      • -------- ================================================ --------
      • Custom script: call SetUnitX(udg_TempTrigUnit, GetLocationX(udg_TempPoint2))
      • Custom script: call SetUnitY(udg_TempTrigUnit, GetLocationY(udg_TempPoint2))
      • -------- ================================================ --------
      • Animation - Play TempTrigUnit's Morph Alternate animation
      • -------- ================================================ --------
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call RemoveLocation(udg_TempPoint2)
      • Custom script: set udg_TempPoint = null
      • Custom script: set udg_TempPoint2 = null
      • Custom script: set udg_TempPoint3 = null
      • Custom script: set udg_TempTrigUnit = null
      • Custom script: set udg_TempDummyUnit = null
      • -------- ================================================ --------
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
I know this may sound stupid, but even if your dummy unit has 0 cast point, cast backswing, 0 blend time etc, you still need to move dummy unit somewhere to be able to make consecutive spell casts, like this:

  • For each (Integer TempInt) from 1 to TempInt3, do (Actions)
    • Loop - Actions
    • -------- ================================================ --------
    • Set TempPoint3 = (TempPoint offset by (100.00 x (Real(TempInt))) towards (Angle from TempPoint to TempPoint2) degrees)
    • -------- ================================================ --------
    • Unit - Move TempDummyUnit to position of TempDummyUnit
    • Unit - Order TempDummyUnit to Undead Crypt Lord - Impale TempPoint3
    • -------- ================================================ --------
    • Custom script: call RemoveLocation(udg_TempPoint3)
    • Game - Display to (All players) the text: (TempPoint3 is located at: + (String((100.00 x (Real(TempInt))))))
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
Here is a testmap, you wanted something like this?
 

Attachments

  • BloodDrunkTest.w3x
    14.8 KB · Views: 62
Level 12
Joined
Feb 22, 2010
Messages
1,115
By the way, if you remove move actions in my test map it won't work.I knew I wasn't crazy.
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
By the way, if you remove move actions in my test map it won't work.I knew I wasn't crazy.
That move should be removed. You didn't set up the dummy correctly. Base ms has to be 0 so that the unit doesn't have to turn to cast something.
But mine and yours arw COMPLETELY the same, I even created new dummy and made it like yours, but it STILL won't cast.
Just upload the damn map already and this will be cleared :grin:.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
0 ms creates a new state of the units.
(setting 0 ms in triggers as well or 0% ms factor)

what happens is that you cannot cast spells like blink any more, the move action buttons are removed from the hud and you will not be able to turn any more.
This also means that turning will not be a requirement any more.

SetUnitX and SetUnitY also dont work for those units properly.
 
Status
Not open for further replies.
Top