• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Help with passive

Status
Not open for further replies.

strudle120

S

strudle120

Hi

I wanna make a passive ability wich has a percentage chance of snaring the attacked unit. This is what I have so far...

Wc3help.jpg


I would be very happy if someone could tell me what im doing wrong... I have 100 because I needed to test if I was just unlucky.
 
1. Add "Ensnare" to a dummy's abilities in object editor, not via trigger.
2. Make a variable of type integer.
3. Set it to a random number in the beginning of the trigger.
4. Make "if then else" action.
5. Move that highlighted condition to it, replacing "Random integer number between 1 and 100" with the name of your variable.
6. Move all your actions to the "then" section.

Try it.
 
Okay I tried what you said and its still not working... im gonna add a variable for the location of the caster.

Anyways... now it looks like this:

Wc3help2.jpg


*100 is still there so that I will be able to test if the spell works or not.
 
Sure here it is...

Look under the Dummy spells tab in order to find it.
 

Attachments

The ability Ensnare has a requirement - you need to research it to be able to use it.
Just remove the requirement in object editor: Techtree - requirements.
Also this line
  • FireEnsnare Less than or equal to ((Level of Fire Catcher for (Triggering unit)) x 100)
returns false since you're checking the triggering unit/attacked one.
 
Yes, this is also necessary. Because I made the same trigger and it works normally.

  • Events
    • Unit - A unit Is attacked
  • Conditions
    • (Unit-type of (Attacked unit)) Equal to Raider
    • (Level of ensnare FOR SURE for (Attacked unit)) Greater than 0
  • Actions
    • Set snare_chance = (Random integer number between 0 and 100)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • snare_chance Greater than 1
      • Then - Actions
        • Unit - Create 1 dummy for (Owner of (Attacked unit)) at (Position of (Attacked unit)) facing Default building facing degrees
        • Unit - Order (Last created unit) to Orc Raider - Ensnare (Attacking unit)
        • Unit - Add ensnare FOR SURE to (Last created unit)
        • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Else - Actions
 
Last edited:
Thank you all for the help ive gotten... it works perfectly now. Now I can sleep well :D

I wanna thank you all again for taking the time to answear my question.
 
Status
Not open for further replies.
Back
Top