• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Need help with a Passive ability

Status
Not open for further replies.
Level 7
Joined
Sep 8, 2011
Messages
211
So this passive works like this. (this ability will not level up)

If one enemy hero come with in 800 yards of The Escape Artist (your hero) her movement speed and attack speed will increase by 6%, if two heroes come with in range, then her movement speed and attack speed will increase to 11% and if its three heroes with in range of her, then 15%. (only up to 3 enemy heroes).

I have looked at the triggers for a bit and couldn't find something apart from "Units with in range of (specific unit)" and that's not what I am looking for considering the hero The Escape Artist doesn't start on the map. Can anyone help me out? Or at lest point me in the right direction?

Also there is another passive I was thinking about where there are stacking involved.

If the Black Dragon (your hero) casts an ability (any on e of his four abilities) he will gain one shadow power. Once his shadow power reaches 7 he will heal himself for 10% and gain 10% mana. Can anyone help me with that too?

Thanks.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
1. Periodically pick units within range of the unit.

set unit = yourHero
set point = position of your unit
Custom script: set bj_wantDestroyGroup = true
set integer = number of units in (units within x of unit matching ((matching unit) belongs to an enemy of owner of unit) and ((matching unit) is alive) and ((matching unit) is a structure) equal to false)

Then you got the number of units in an integer and work from there.

2. You can use a hashtable ar an array and a unit indexer.

Event - Unit starts the effect of an ability
Condition - Unit type of triggering unit == your unit
Actions
If cast count == 6 then heal and set cast count to 0
else set cast count = cast count + 1

You can find Bribe's unit indexer in the spell database, or look for a hashtable tutorial.
 
Status
Not open for further replies.
Top