• 🏆 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!

[Trigger] Scaling using custom value

Status
Not open for further replies.
Level 8
Joined
Nov 9, 2008
Messages
502
Hey HIVE.
So I'm trying to create an effect to "grow" some units but there is a problem that even though the maths of the trigger say unit should reach 100% height scale (of original) it does not.


  • grow Copy
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set m = (All players matching (((Matching player) controller) Equal to User))
      • Player Group - Pick every player in m and do (Actions)
        • Loop - Actions
          • Set e[1] = (Units owned by (Picked player) matching (((Unit-type of (Matching unit)) Equal to Wheat) and (((Matching unit) is Summoned) Equal to True)))
          • Unit Group - Pick every unit in e[1] and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Custom value of (Picked unit)) Greater than 3000
                • Then - Actions
                  • -------- MY ACTIONS --------
                • Else - Actions
                  • Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) + ((Integer(((Percentage mana of (Picked unit)) / 20.00))) + 10))
                  • Animation - Change (Picked unit)'s size to (((Real((Custom value of (Picked unit)))) / 60.00)%, ((Real((Custom value of (Picked unit)))) / 60.00)%, ((Real((Custom value of (Picked unit)))) / 30.00)%) of its original size
          • Custom script: call DestroyGroup(udg_e[1])
      • Custom script: call DestroyForce(udg_m)
The maths say when it reaches final stage (custom value of >3000) it should be at 50% length and width and 100% height but it ends closer to something like 30% no matter if I change the original scale value of the unit or the percentage changed formula.

I even changed height formula to something ridiculous like custom value*100 and nothing changed in-game.

Anyone got ideas to sort this out?
 
Level 8
Joined
Nov 9, 2008
Messages
502
Yes that was the problem and works smoothly now except the units are too damn wide!

Just when you think you got something perfect WE turns round and kicks u in the nuts :(

Thanks for the info.

SOLVED
 
Status
Not open for further replies.
Top