• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Modifying unit size

Status
Not open for further replies.

Uncle

Warcraft Moderator
Level 74
Joined
Aug 10, 2018
Messages
7,961
Use a Unit Indexer, Hashtable, or anything that's used to make things MUI.

Then you keep track of each unit's scale with a variable.

A unit gets a kill -> Set Scale[killing unit] to Scale[killing unit] + X -> Set size of killing unit to Scale[killing unit].

Check out what I posted in this thread, I attached a map and everything: Hero Size Increase after Level UP
Example ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
Last edited:

Uncle

Warcraft Moderator
Level 74
Joined
Aug 10, 2018
Messages
7,961
Can't you just do something like this?
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Unit - Set Unit: (Killing unit)'s Real Field: Scaling Value ('usca') to Value: ((Unit: (Killing unit)'s Real Field: Scaling Value ('usca')) x 1.05)
Only issue with that is you're now multiplying the new scaling value by 1.05x instead of the original value. Like: 1.00 * 1.05 = 1.05, 1.05 * 1.05 = 1.1025, 1.1025*1.05 = 1.157625.

The difference starts out small but will get bigger and bigger with every kill.
 
Last edited:

Uncle

Warcraft Moderator
Level 74
Joined
Aug 10, 2018
Messages
7,961
Well you can do "+ 0.05" or something instead.
True, that seems like the better option in most situations. I still find it nice to have a variable that keeps track of the default value for when you want to reset the scale. Not every unit uses a 1.00 base scale after all.

This wouldn't be a problem if we could get information from the unit-type instead of the unit. Would make getting/setting these things a lot easier.
 
Status
Not open for further replies.
Top