No. of hits skill

envenger

Active Member
Reaction score
3
How can i make a skill which will trigger wehn my hero takes a ammount of hits

e.g.
i want my hero to stun a area arround him after he has taken 5 hits that may or may not damage
 

Idontknowyou

New Member
Reaction score
33
Add Attacked Event
Trigger:
  • Events
    • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • Trigger - Add to Unit is Attacked <gen> the event (Unit - (Triggering unit) Is attacked)


Unit is Attacked
Trigger:
  • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has buff Reflect) Equal to True
        • Then - Actions
          • Set HitsTaken[(Player number of (Owner of (Triggering unit)))] = (HitsTaken[(Player number of (Owner of (Triggering unit)))] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HitsTaken[(Player number of (Owner of (Triggering unit)))] Equal to 5
            • Then - Actions
              • Set TempPoint = (Position of (Triggering unit))
              • Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 400.00 at TempPoint, dealing 100.00 damage of attack type Spells and damage type Normal
              • Special Effect - Create a special effect at TempPoint using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
              • Special Effect - Destroy (Last created special effect)
              • Custom script: call RemoveLocation (udg_TempPoint)
            • Else - Actions
        • Else - Actions


you can also add a bunch of other ifs thens and elses to this trigger for other abilities that trigger upon attack

notes:
-"hits taken" is an integer with an array of 12, I asumed that eaach player wold only have one unit casting this ability
-"temp point" is used to prevent lag, it is removed with the custom script
-neutral building explosion is listed under spawned effects, it would be a good effect for this ability imo "BOOM!" hehe :p
-Triggering unit is the correct function for "unit is attacked" btw, this is not a mistake
 

Grymlax

Probably not around
Reaction score
138
Idontknowyou what is the purpose of your first trigger? you do know that there is a generic "unit is attacked" event, right?

Unit - A unit Is attacked
 

envenger

Active Member
Reaction score
3
dummy unit

Hey i want my dummy unit to cast a slam but the prob is i dont get under the "order unit" how do i make a dummy unit cast my custom spell?
 

LightChaosma

New Member
Reaction score
60
you order it to cast the spell wich you based your spell of. e.g. if you have a skill URSKILL, based of thunder clap, you order human - mountain king - thunder clap
 

envenger

Active Member
Reaction score
3
Well this is my second trigger in life so please correct me if i am wrong

Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - Arthas 0001 <gen> Is attacked
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has buff ret ) Equal to True
        • Then - Actions
          • Set Rethitstaken[(Player number of (Owner of (Triggering unit)))] = (Rethitstaken[(Player number of (Triggering player))] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Rethitstaken[(Player number of (Owner of (Triggering unit)))] Equal to 5
            • Then - Actions
              • Unit - Move ( dummy (Level 1)) instantly to (Position of (Triggering unit))
              • Unit - Order dummy (Level 1) 0002 <gen> to Human Mountain King - Thunder Clap
              • Set Rethitstaken[(Player number of (Owner of Arthas 0001 <gen>))] = 0
            • Else - Actions
        • Else - Actions


Thanks @ Idontknowyou for help but still i dont know you :p

--------------Edit------------

me Dummy is just moving and not casting
 

envenger

Active Member
Reaction score
3
which skill should i use as a AOE stun?

same prob dummy is not casting

--------------------------

k got the problem was mana cost now everything is ok
 

NoobImbaPro

You can change this now in User CP.
Reaction score
60
This is the map you need exactly just copy triggers variables and spells.If you need your ability to be cast just change the buff of the trigger to the buff that your skill gives.
 
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