HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Temporarily increasing stats of a hero?

01-03-2006, 05:55 AM#1
Ignitedstar
I have an ability for a hero that increases the stats of another hero by a fraction of the hero's stat based on which ability is used.

I'll use Strength as in example. If a Paladin has 30 Strength and the ability increases another hero's, let's say the Mountain King's Strength by 1/5 of that amount, then the MK should get 6 Strength. After a duration of time, let's say three minutes, the stat bonus dissapears or whenever it's corresponding buff does.

Yeah, it's possible, but I don't quite know exactly what to do. Can someone help?
01-03-2006, 01:02 PM#2
Zoxc
Make the ability triggered.

Something like this:
Code:
set StrAdd = Strength of Caster / 5
Pick every hero within 1000 range of caster:
 If Picked unit is allied
   Add Strength Bonus ( StrAdd ) to Picked unit
   Set custom value of Picked unit = 1
Wait 120 sec.
Pick every hero in map:
  If custom value of Picked unit = 1
   Clear Picked unit's Strength Bonus
You might use bonus mod to add strength to heroes.

But this code is not multi instansable.. you need some JASS-ing then ^^
01-03-2006, 01:26 PM#3
Earth-Fury
Quote:
Originally Posted by Zoxc
Make the ability triggered.

Something like this:
Code:
set StrAdd = Strength of Caster / 5
Pick every hero within 1000 range of caster:
 If Picked unit is allied
   Add Strength Bonus ( StrAdd ) to Picked unit
   Set custom value of Picked unit = 1
Wait 120 sec.
Pick every hero in map:
  If custom value of Picked unit = 1
   Clear Picked unit's Strength Bonus
You might use bonus mod to add strength to heroes.

But this code is not multi instansable.. you need some JASS-ing then ^^

why not just add them to a unit group (array for multi-instanceability) ?
01-03-2006, 02:01 PM#4
Zoxc
Simply because im tired ;)
01-03-2006, 10:36 PM#5
Ignitedstar
Oh, I don't think I asked for it to be AOE, but that's okay. Thanks.

How did you get the custom value condition? I can't seem to find it.