• 🏆 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!

Mana Steal issues

Status
Not open for further replies.
Level 5
Joined
Dec 22, 2007
Messages
103
Trying to make a mana steal effect, like life steal.
I used Orb of slow, and made the effect ability steal from wand of mana stealing.
The issue is this only works properly when a user deliberately gives the attack option. Attack to, or passive aggro will cause the attacks to not properly steal mana, thus making it useless to put on neutral hostile creeps.
I tried an alternate method of making a siphon mana proc on every attack, but casting a spell after this effect has worked once will cause WC3 to crash, regardless of how low i put the intervals.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
The issue is this only works properly when a user deliberately gives the attack option. Attack to
Orb of Slow (or any other Orb-based abilities such as Orb of Lightning (new), etc) has a hard-coded mechanics that will only trigger when you order it to Attack (and any other action similar to it).

If the unit acquires a target and move to the target and attack on its own, the Orb can never trigger, it is hard-coded and you can't change it.

The only way is to trigger it somehow by using this function when unit takes damage;
  • Unit - Set mana of (Attacking unit) to ((Mana of (Attacking unit)) + 5.00)
Use any Damage Detection System, and just use that function.
That trigger will give you +5 Mana per damage land upon unit (provided that you don't use the Event - Unit Is attacked).
 
Level 15
Joined
Jul 6, 2009
Messages
889
The only way is to trigger it somehow by using this function when unit takes damage;
  • Unit - Set mana of (Attacking unit) to ((Mana of (Attacking unit)) + 5.00)
Use any Damage Detection System, and just use that function.
That trigger will give you +5 Mana per damage land upon unit (provided that you don't use the Event - Unit Is attacked).

(Attacking unit) responds only with Event - A unit is attacked, so a unit doesn't need to damage the target to gain mana. In this way, a unit can spam stop whilst attacking to rapidly gain mana. You'll have to use a damage detection system as well trigger all damage in order to distinguish what is an 'attack'.

Or you could be like DotA. Use the A unit is attacked event, but then register the next damage dealt by the attacking unit. On damage, steal mana. Still not the best way. But it works.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
I thought so people would misunderstood my statement :)
That's why I prepare this text earlier before.

Use any Damage Detection System, and just use that function.
I asked him to use Damage Detection System and use that function, when combined, it will work.

Also,
That trigger will give you +5 Mana per damage land upon unit (provided that you don't use the Event - Unit Is attacked).

I emphasized on not using the bugged event for handling situation like Damage Taken.

And when I meant Damage Detection System, it should be one of the approved system such as Weep's or Bribe's.
 
Level 15
Joined
Jul 6, 2009
Messages
889
You've said to use

  • Unit - Set mana of (Attacking unit) to ((Mana of (Attacking unit)) + 5.00)
when a unit takes damage. This action will not respond to damage detection. It is damage source or w/e. But meh.

I wonder if you could order an attack order when a unit is attacked to somehow bypass that problem with the orbs.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Oh shit, I should have been more precise eh ?
I meant, replace those parameters with global variable that the Damage Detection System provided you with.

I take Weep's GDD for example, it should look something like this;
  • Unit - Set mana of GDD_DamageSource to ((Mana of GDD_DamageSource) + 5.00)
GDD_DamageSource is the unit that landed the damage on the unit (you can't spam the 'S' button because that's why systems are for, to counter bugs)
This system will wait perfectly right on time where when the unit successfully damages the unit, the Event occurs.

You feeling me ?
 
Status
Not open for further replies.
Top