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

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