Damage not working for triggered spell

Firezy

New Member
Reaction score
14
I tested it and it works for when a unit belongs to a player, everything is fine

but when I make it so that a computer owns the unit when he casts the spell the second trigger doesn't happen so... yeah

suggestions?

Trigger:
  • Ice Overlordcast
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacked unit)) Equal to |cCFFF0202Frigid Overlord |n*Boss*
    • Actions
      • Unit - Order (Attacked unit) to Special - Channel

Trigger:
  • Ice Overlord
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Ice Storm (Ice Overlord)
    • Actions
      • Set p_IceOverlord = (Position of (Casting unit))
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at p_IceOverlord facing Default building facing degrees
      • Set u_overlord = (Last created unit)
      • Unit - Add (Ice Storm Dummy) to u_overlord
      • Unit - Set level of (Ice Storm Dummy) for u_overlord to 1
      • Unit - Order u_overlord to Human Archmage - Blizzard p_IceOverlord
      • Unit - Add a 6.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_p_IceOverlord)
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
try setting "begins casting an ability" because the computer probably (by default) overrides the spell cast order because he is ordered to attack the enemy unit continuously (if you order a unit to cast an ability and then immediately order him to move/attack he will cancel to spell cast order)

and to be safe, do this in the first trigger:

Code:
e: unit is attacked
c: unit type of attacked unit equal to...
a: remove [ability] from attacked unit
   add [ability] to attacked unit
   order attacked unit to Special - Channel

hope it works
 

Firezy

New Member
Reaction score
14
Still doesn't work and still works for a unit under my control though...

PS doing that in the first trigger would just reset the cool down of the ability
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
just for testing, make an action in the 2nd trigger that will display a message to see if it even gets there

EDIT: why don't you just do this

Trigger:
  • trigger
    • Events
      • Unit - a unit is attacked
    • Conditions
      • Unit-type of attacked unit equal to ...
      • Mana for attacked unit greater than or equal to [the mana cost of the ability]
    • Actions
      • Set p_IceOverlord = (Position of (attacked unit))
      • Unit - Create 1 Dummy for (Owner of (attacked unit)) at p_IceOverlord facing Default building facing degrees
      • Set u_overlord = (Last created unit)
      • Unit - Add (Ice Storm Dummy) to u_overlord
      • Unit - Set level of (Ice Storm Dummy) for u_overlord to 1
      • Unit - Order u_overlord to Human Archmage - Blizzard p_IceOverlord
      • Unit - Add a 6.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_p_IceOverlord)


although it will look strange because the unit wont play his animation...
 

Firezy

New Member
Reaction score
14
But that trigger would make it so that whenever he is attacked whether the original spell is cd or not.

ill test the msg
 

Firezy

New Member
Reaction score
14
I tested it as such

Trigger:
  • Ice Overlord
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Ice Storm (Ice Overlord)
    • Actions
      • Game - Display to (All players) the text: test
      • Set p_IceOverlord = (Position of (Casting unit))
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at p_IceOverlord facing Default building facing degrees
      • Game - Display to (All players) the text: test1
      • Set u_overlord = (Last created unit)
      • Unit - Add (Ice Storm Dummy) to u_overlord
      • Game - Display to (All players) the text: test2
      • Unit - Set level of (Ice Storm Dummy) for u_overlord to 1
      • Game - Display to (All players) the text: test3
      • Unit - Order u_overlord to Human Archmage - Blizzard p_IceOverlord
      • Game - Display to (All players) the text: test4
      • Unit - Add a 6.00 second Generic expiration timer to u_overlord
      • Game - Display to (All players) the text: test5
      • Custom script: call RemoveLocation (udg_p_IceOverlord)


and I got all the messages back so... dunno
 

Firezy

New Member
Reaction score
14
bump please this is sooo annoying it works for any player controlled hero not CPU though
 
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