• 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.

[Trigger] Can someone make a trigger so when...

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
Simply get the trigger to trigger every time the hero lvls up and using if then statments do your actions like. . .

JASS:
function Trig_LevelUP_Actions takes nothing returns nothing
    local integer l = GetHeroLevel(GetLevelingUnit())
    If l == 2 then
        call SetUnitScale(GetLevelingUnit(),2,2,2)
    elseif l == 3 then
        call SetUnitScale(GetLevelingUnit(),3,3,3)
    elseif l == 4 then
        call SetUnitScale(GetLevelingUnit(),4,4,4)
    elseif l == 5 then
        call SetUnitScale(GetLevelingUnit(),6,6,6)
    else
        call BJDebugMsg("You get no more effects past level 5!")
    endif
endfunction

HMMMMM the jass brackets are not opperating properly. . . . . . . . . .
I do not know why but the jass brackets are not opperating correctly i have tried everything but still they do not work. . .
 
Last edited:
Level 11
Joined
Jul 12, 2005
Messages
764
Super Good, correct me if i'm wrong, but i don't think he means "growing" by word... I think it's when a hero levels..

Event -
-Hero gains a level
Cond -
Action -
-If (Random integer between 1 and 2) is equal to 1
--Hero - Learn skill for hero
-Else
--Add x gold to (Owner of Triggering Unit)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
It was an EXAMPLE!
The scale function was only added to demonstrate how an action would be inserted into it.
It could be replaced with any functions the triggerer wanted and I only posted it to show what I meant since it was an easy function I knew for sure how to spell.
 
Heres a GUI version if you want something for a specific level:
Event: Unit gains a level
Conditions: Unit type of level unit equal to [whatever]
Level of triggering unit equal [wahtever]
Actions: Unit - Teach [whatever] to [triggering unit]
Player - Add [amount] to owner of triggering unit current gold

And uh money is gold.
 
Status
Not open for further replies.
Top