• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Modifying unit size

Status
Not open for further replies.

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,539
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 64
Joined
Aug 10, 2018
Messages
6,539
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 64
Joined
Aug 10, 2018
Messages
6,539
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