• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Help with Passive-chance based entagling roots spell

Status
Not open for further replies.
Level 9
Joined
Jun 10, 2013
Messages
473
hello all >:D its been a while since I've been triggering so im a little rusty basically I need help triggering a passive ability which will have a chance of making the attacked unit be affected by a custom entangling roots the exact description of the ability is below:

Sprout:
With each attack the warrior has a chance to invoke the wrath of nature upon its foes. Attacks made by this unit have a 30% chance to sprout entangling roots upon the attacked enemy unit; disabling and damaging the attacked unit by 10 hitpoints per second for 5 seconds.

any trigger and dummy object data ability help will be appreciated. Thanks in advance and in case I forget :)
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
You need a damage detection system from Bribe:

http://www.hiveworkshop.com/forums/...e-v3-5-4-1-a-201016/?prev=d=list&r=20&u=Bribe

Using that, you make this trigger:

  • Sprout
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • (Level of Sprout for DamageEventSource) Greater than or equal to 1
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 30
        • Then - Actions
          • Set TempPoint = (Position of DamageEventSource)
          • Unit - Create 1 Dummy Unit for (Owner of DamageEventSource) at TempPoint facing Default building facing degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Night Elf Keeper Of The Grove - Entangling Roots DamageEventTarget
          • Custom script: call RemoveLocation (udg_TempPoint)
        • Else - Actions
If you don't want a unit to be entangled when it's already entangled, add the following line to the trigger's conditions:

  • (DamageEventTarget has buff Sprout ) Equal to False
Here is a demo map. I just made the spell within Bribe's Damage Detection Map.
 

Attachments

  • Sprout Ability.w3x
    40.1 KB · Views: 57
Level 9
Joined
Jun 10, 2013
Messages
473
You need a damage detection system from Bribe:

http://www.hiveworkshop.com/forums/...e-v3-5-4-1-a-201016/?prev=d=list&r=20&u=Bribe

Using that, you make this trigger:

  • Sprout
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • (Level of Sprout for DamageEventSource) Greater than or equal to 1
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 30
        • Then - Actions
          • Set TempPoint = (Position of DamageEventSource)
          • Unit - Create 1 Dummy Unit for (Owner of DamageEventSource) at TempPoint facing Default building facing degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Night Elf Keeper Of The Grove - Entangling Roots DamageEventTarget
          • Custom script: call RemoveLocation (udg_TempPoint)
        • Else - Actions
If you don't want a unit to be entangled when it's already entangled, add the following line to the trigger's conditions:

  • (DamageEventTarget has buff Sprout ) Equal to False
Here is a demo map. I just made the spell within Bribe's Damage Detection Map.

Thanks i'll test it out >:D
 
Level 9
Joined
Jun 10, 2013
Messages
473
You need a damage detection system from Bribe:

http://www.hiveworkshop.com/forums/...e-v3-5-4-1-a-201016/?prev=d=list&r=20&u=Bribe

Using that, you make this trigger:

  • Sprout
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • (Level of Sprout for DamageEventSource) Greater than or equal to 1
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 30
        • Then - Actions
          • Set TempPoint = (Position of DamageEventSource)
          • Unit - Create 1 Dummy Unit for (Owner of DamageEventSource) at TempPoint facing Default building facing degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Night Elf Keeper Of The Grove - Entangling Roots DamageEventTarget
          • Custom script: call RemoveLocation (udg_TempPoint)
        • Else - Actions
If you don't want a unit to be entangled when it's already entangled, add the following line to the trigger's conditions:

  • (DamageEventTarget has buff Sprout ) Equal to False
Here is a demo map. I just made the spell within Bribe's Damage Detection Map.

It works PERFECTLY! I just have two question how do I stop the number appearing on screen when a unit is hit and which set of conditions to I put the prevention trigger in?
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
But rather than import the damage detection system you could just do "a unit is attacked."

I'm pretty sure this event fires when a unit begins attacking. So the player can spam attack and stop requests to abuse the ]system. You need a DDS to ensure the system only applies when the unit is actually hit.

I just have two question how do I stop the number appearing on screen when a unit is hit

I made your spell within Bribe's Damage Detection Engine map. Theres a bunch of other triggers you don't need, I just didn't remove them.

The only triggers you need from the DDS are the "Unit Indexer" Trigger, and the "Damage Engine" trigger. You can delete the 6 triggers found under the Test 1 folder. You can also remove the "Is Unit Moving" trigger if you have no need to detect if units are moving or not.

which set of conditions to I put the prevention trigger in?

Here. Note I made a small mistake. The buff should be entangling roots, not sprout (whatever buff is given to the entangling roots ability).

  • Sprout
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • (Level of Sprout for DamageEventSource) Greater than or equal to 1
      • (DamageEventTarget has buff Entangling Roots) Equal to False
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 30
        • Then - Actions
          • Set TempPoint = (Position of DamageEventSource)
          • Unit - Create 1 Dummy Unit for (Owner of DamageEventSource) at TempPoint facing Default building facing degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Night Elf Keeper Of The Grove - Entangling Roots DamageEventTarget
          • Custom script: call RemoveLocation (udg_TempPoint)
        • Else - Actions
You could also do the Orb Effect trick, no triggering skills needed.
Passive ability with a cooldown (attack-based)

Seems interesting. Does it allow the 30% chance thing though?
 
SImple is better. But rather than import the damage detection system you could just do "a unit is attacked." I know it's not as fancy, but I'm not sure he needs to make it happen on impact. That's a lot of work for a simple move like this. The orb ability is probably the way to go.

Please, just please, don't use that event in this kind of case.

Anyway, I would go with the orb theory instead. It saves lots of time, but the DDS way sure doesn't hurt and the system itself worth a long run.
 
Status
Not open for further replies.
Top