• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

how can you make an avatar type that is affected by the casting units str int and agl

Status
Not open for further replies.
Level 3
Joined
Oct 19, 2007
Messages
39
ahk...but i have never used jass before how would make it that it only lasts for 180 secounds? or hyow to make it to change the attributes when the spell is cast
 
Level 11
Joined
Feb 22, 2006
Messages
752
You can just wait 180 seconds then remove the bonuses using clearBonus(). To set bonuses, call the function setBonus(). The first argument is the magnitude of the bonus, the second argument is the unit receiving the bonus, and the third argument is an integer that corresponds to the type of bonus.

0: damage
1: armor
2: hitpoints
3: mana

So, if I wanted to add a 300 hp bonus to a unit saved under variable udg_Hero, i would do:

JASS:
call setBonus( 300, udg_Hero, 2 )
 
Status
Not open for further replies.
Top