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

[General] Triggering - Hero gain size per level

Status
Not open for further replies.
Level 4
Joined
Aug 7, 2010
Messages
74
Hey lovely people, i am currently struggling on a simple trigger that would be:

When a hero gets a level up, triggering hero gains 5% size.


I know it is bloody easy but i just got stuck, please help me :xxd:
 
Level 29
Joined
Feb 18, 2014
Messages
3,592
  • Hero Level Size
    • Events
      • Unit - A unit Gains A Level
    • Conditions
    • Actions
      • Set ScaleSize = (ScaleSize + 5.00)
      • Animation - Change (Leveling Hero)'s size to (ScaleSize%, ScaleSize%, ScaleSize%) of its original size
ScaleSize is the current size of the hero which means if the size of your hero is 1.00 in the Object Editor then set ScaleSize to 100 in Variables.
 
Level 4
Joined
Aug 7, 2010
Messages
74
First of all, thank you so much for the ultra speed reply! I remember seeing your profile picture every now and then throughout the years xD very catchy and addictive to look at.



I did pretty much exactly this. But what happens in game is as follows: After level up, Hero shrinks down to 5% of its original size to then gain 5% more size per level. It may work halfway but it always seems to start from that 5% value first after triggering the trigger.

What i did:
-created a variable (type: real) with the initial amount: 100
-created this trigger you posted, except it reads a bit differently: Set VariableSet ScaleSize[100] = (ScaleSize[100] + 5)
Where the 100 is, there it asked for the "Index".
If this is wrong, i don't know where to find the right selection.


Best regards
 
Level 4
Joined
Aug 7, 2010
Messages
74
That's because you created an array instead of just one variable.
Clapped my head, changed the variable + trigger. Worked perfectly.

Ahahahaha man, laughing out so loud out of joy right now xD I knew somewhere must be the splinter in the feet.

Thank you so unbelievably much! :grin::ogre_love:
 
Status
Not open for further replies.
Top