Recreating critical strike - how do I refer to damaged unit?

Ashcat

Hellooo
Reaction score
68
Okay, I'm trying to make a trigger that basically will do exactly what critical strike does. This is my trigger so far, right now it crashes the game, but I know why and thats not the problem. The problem is that I do not know how to refer to the damaged unit, as highlighted in the code:

Code:
Critical Strike
    Events
    Conditions
    Actions
        Set Temp_Point = (Position of ([B][COLOR="Red"]Attacked unit[/COLOR][/B]))
        Floating Text - Create floating text that reads ((String((Integer(((Damage taken) + ((Damage taken) x (0.50 x (Real((Level of Critical Strike for (Damage source))))))))))) + !) at Temp_Point with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
        Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
        Floating Text - Change (Last created floating text): Disable permanence
        Floating Text - Change the lifespan of (Last created floating text) to 3.60 seconds
        Unit - Cause (Damage source) to damage ([B][COLOR="Red"]Attacked unit[/COLOR][/B]), dealing ((Damage taken) x (0.50 x (Real((Level of Critical Strike for (Damage source)))))) damage of attack type Hero and damage type Normal
        Custom script:   call RemoveLocation (udg_Temp_Point)

If anyone could help me out with this I'd be really appreciative : )
 

Flare

Stops copies me!
Reaction score
662
If you're using "Unit Takes Damage", you can use triggering unit for the damaged unit and damage source for the damaging unit

edit: as first line of your trigger, add "Turn off this trigger" and add "turn on this trigger" as the last line. the damage target action is causing the trigger to fire and is created an infinite loop. thats whats causing ur crash ^^

edit: oh, you already knew why it was crashing xD
 

Ashcat

Hellooo
Reaction score
68
If you're using "Unit Takes Damage", you can use triggering unit for the damaged unit and damage source for the damaging unit

This is what I was looking for, ty much : )

edit: as first line of your trigger, add "Turn off this trigger" and add "turn on this trigger" as the last line. the damage target action is causing the trigger to fire and is created an infinite loop. thats whats causing ur crash ^^

edit: oh, you already knew why it was crashing xD

Yes hehe I did : p ty anyway 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