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
 
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
 
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
 
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?
 
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
 
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
 
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
 
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.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top