• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Unit grows through a ability

Status
Not open for further replies.
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

You mean something like that?:


  • TestTrig2144
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Grow
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Grow for (Triggering unit)) Equal to 1
        • Then - Actions
          • Animation - Change (Triggering unit)'s size to (125.00%, 125.00%, 125.00%) of its original size
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Grow for (Triggering unit)) Equal to 2
        • Then - Actions
          • Animation - Change (Triggering unit)'s size to (150.00%, 150.00%, 150.00%) of its original size
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Grow for (Triggering unit)) Equal to 3
        • Then - Actions
          • Animation - Change (Triggering unit)'s size to (175.00%, 175.00%, 175.00%) of its original size
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Grow for (Triggering unit)) Equal to 4
        • Then - Actions
          • Animation - Change (Triggering unit)'s size to (200.00%, 200.00%, 200.00%) of its original size
        • Else - Actions
  • TestTrig2145
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Grow
    • Actions
      • Set TempInteger = ((Point-value of (Triggering unit)) + (25 x (Level of Grow for (Triggering unit))))
      • Animation - Change (Triggering unit)'s size to ((Real(TempInteger))%, (Real(TempInteger))%, (Real(TempInteger))%) of its original size
      • Set TempInteger = 0
Edit: It's better to deal with the point value of the unit - why? because if your unit has a beginning size of 2.00 and you use the first trigger, the unit doesn't grow, it gets smaller because this 125% goes from unit size of 1.00.
How to use the point value. A value of 100 = is a beginning size of 1.00. A value of 250 is a beginning size of 2.50


Greetings
~ The Bomb King > Dr. Boom
 
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

BloodRush - bet you mean BloodLust =), the thing is how you want mod bloodlust if he want a permanent ability and the growing stuff? In this case I think triggering is the better way =)

Anyway Jass is the best way ( Sry but I like it and you wont need a variable AND you just can copy & paste it ^^ )


JASS:
function Trig_TestTrig2146_Actions takes nothing returns nothing
    local real r = (GetUnitPointValue(GetTriggerUnit()) + 25 * GetUnitAbilityLevel(GetTriggerUnit(), 'A000'))

        if GetLearnedSkill() == 'A000' then
            call SetUnitScale(GetTriggerUnit(), r * 0.01, r * 0.01, r * 0.01)
            set r = 0.00
        endif
endfunction
//===========================================================================
function InitTrig_TestTrig2146 takes nothing returns nothing
    set gg_trg_TestTrig2146 = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_TestTrig2146, EVENT_PLAYER_HERO_SKILL )
    call TriggerAddAction( gg_trg_TestTrig2146, function Trig_TestTrig2146_Actions )
endfunction
Greetings
~ The Bomb King > Dr. Boom
 
Level 4
Joined
Apr 19, 2010
Messages
80
thanks man, last questions, is it possible to just grow when i start the ability? Like the Avatar ability, click on it, grow and later shrink again and another one that if i click on it i grow and again i shrink back to the normal size, so that means two abilities
 
Level 8
Joined
Jun 26, 2010
Messages
530
i think you can remove buff to make him back to normal

That's true. I don't downloaded General Frank's map, but i'm guessing he just edited the bloodlust duration to 0, so it lasts 'till it's debuffed. So, yes, you can remove the buff. You can do that by trigger or base a activation ability on something like imollation, then by triggers when a unit activate immolation you give the dummy ability that makes the unit size grows. Like General Said, I don't know too if them stack and i can't test today, but that's pretty simple, just make another ability based on bloodlust and cast that one an the original on some unit.
 
That's true. I don't downloaded General Frank's map, but i'm guessing he just edited the bloodlust duration to 0, so it lasts 'till it's debuffed. So, yes, you can remove the buff. You can do that by trigger or base a activation ability on something like imollation, then by triggers when a unit activate immolation you give the dummy ability that makes the unit size grows. Like General Said, I don't know too if them stack and i can't test today, but that's pretty simple, just make another ability based on bloodlust and cast that one an the original on some unit.

Nope. I just entered 120 seconds.
 
Level 8
Joined
Jun 26, 2010
Messages
530
As a b.net melee player i just realized that Bloodlust buff normally (non-custom games) does not stack and when a unit that already have Bloodlust receive the buff again, the second buff just replace the first renewing it's duration. I don't know if it will happen with 2 bloodlust (original and based) abilities.

I really can't find on a easiest way of activating and deactivagint than what i said: Make a dummy (zero effects) activate/deactivate ability and by triggers you add the real ability that will give the Grown effect.

Edit: I just had an idea for the stacking problem. You can make more than 1 ability based on bloodlust, where for each one, there's a different Size Increase Factor (there's a field in Object Editor for that), then, you make triggers that detect if the unit already have the bloodlust buff lvl X, so when it cast bloodlust again you give that unit Bloodlust buff lvl X+1
 
Level 4
Joined
Apr 19, 2010
Messages
80
hm ok so there is no way to turn it off via ability? Or maybe through another ability? And is it possible to make it as a hero ability with different levels etc. or is there a ability which has the same structure from a hero?
 
Level 4
Joined
Apr 19, 2010
Messages
80
the map does not open in editor damn, anyway is there no way to make a ability which changes the size to a bigger one and back to normal like turn on and off?
 
Level 4
Joined
Apr 19, 2010
Messages
80
ok the editor was version 1.0 i updated it now to 1.24, but with the triggers it's too much, isn't it possible to make a very short trigger or an ability which removes the buff if it's already activated?
 
Level 4
Joined
Apr 19, 2010
Messages
80
it's not that hard but to find it is the problem, when i activate the ability it adds a buff but somehow i should be possible to remove that buff with an ability too
 
Level 4
Joined
Apr 19, 2010
Messages
80
nah when i start another ability it should reset the size but it should be an ability like an aura remove or something like that, nothing which adds a new thing
 
Level 4
Joined
Apr 19, 2010
Messages
80
ok the first step has been made, an ability which changes the units size, but than i want it that if i use the same or another ability it changes the size back to normal like a on and off ability well sort of
 
Level 4
Joined
Apr 19, 2010
Messages
80
but that's too much for such a little thing so it's not possible, but maybe a trigger which checks if the unit has this ability already active and if the unit has, it removes the ability effect, so i need a trigger which activates when i use the ability and if the ability has been already cast it deactivates it
 
Level 4
Joined
Apr 19, 2010
Messages
80
yes the trigger is very complex, i made a better and more simple trigger but it's not finished, now when i start the ability and the unit size i can use the ability again but the unit uses the ability again and grows again
 
Level 8
Joined
Jun 26, 2010
Messages
530
yes the trigger is very complex, i made a better and more simple trigger but it's not finished, now when i start the ability and the unit size i can use the ability again but the unit uses the ability again and grows again

Learning can be a slow process, but is always necessary. Especially if you're a map maker. Take your time and study the triggers. Understanding how and what it does is the first step :)
 
Level 4
Joined
Apr 19, 2010
Messages
80
i think i'm nearly finished, i made a trigger which checks when i use the grow ability and than remove the buff, but it only removes the buff and than restart the ability so i have to make an ability which checks if the unit has the buff and than removes it
 
Level 14
Joined
Mar 4, 2009
Messages
1,156
this should be an EASY thread..please explain what abilities you want to have and what you want them to do (when you want them to di it ..)

anyway...

if yo u want to be able to grown unit twice just use 1 bloodlust with 2 levels and increase level when ability is casted (lvl 2 must grow unit more than lvl 1,logical.. xD )

if you want to make him go back you can re-add (remove and add back again) ability or maybe just remove the buff of ability

am not sure if u knew but there is Boolean condition that can check if unit has buff of type X

BTW: before making/trying anything you should learn triggering ... or u might "waste" ur time
 
Last edited:
Status
Not open for further replies.
Top