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

Tree that becomes smaller as it gets harvested?

Status
Not open for further replies.

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,877
This is some janky stuff I threw together but there's not a lot of control for Destructibles:
  • Tree Animations
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Destructible - Pick every destructible in (Playable map area) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Destructible-type of (Picked destructible)) Equal to Summer Tree Wall
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Occlusion height of (Picked destructible)) Less than 3.00
                  • (Current life of (Picked destructible)) Less than or equal to 10.00
                • Then - Actions
                  • Destructible - Set the occlusion height of (Picked destructible) to 3.00
                  • Animation - Play (Picked destructible)'s stand 3 animation
                  • Game - Display to (All players) for 30.00 seconds the text: PLAY ANIM 3
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Occlusion height of (Picked destructible)) Less than 2.00
                      • (Current life of (Picked destructible)) Less than or equal to 20.00
                    • Then - Actions
                      • Destructible - Set the occlusion height of (Picked destructible) to 2.00
                      • Animation - Play (Picked destructible)'s stand 2 animation
                      • Game - Display to (All players) for 30.00 seconds the text: PLAY ANIM 2
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Occlusion height of (Picked destructible)) Less than 1.00
                          • (Current life of (Picked destructible)) Less than or equal to 30.00
                        • Then - Actions
                          • Destructible - Set the occlusion height of (Picked destructible) to 1.00
                          • Animation - Play (Picked destructible)'s stand 1 animation
                          • Game - Display to (All players) for 30.00 seconds the text: PLAY ANIM 1
                        • Else - Actions
            • Else - Actions
The only way I could get the Trees to not repeat their Animations was to mess with their Occlusion Height. It's one of the few values that you can change via triggers for a Destructible.

So I gave the Trees a base Occlusion Height of 0.00, and a starting life of 40.00. Harvest reduces a tree's life by 1.00 every swing, so every 10.00 life lost will play the next Stand animation and increase the occlusion height by 1.00. Increasing the occlusion height prevents the Trees from repeating their Animations.

Obviously this has the unwanted effect of screwing with the occlusion height... but I suppose you could work around that by having a hidden Destructible with the standard 230.00 Occlusion Height stacked inside of the Tree. Not very optimal but the options are limited.
 

Attachments

  • Tree Animations.w3m
    16.9 KB · Views: 20
Last edited:
Dude I don't know what you do to your maps but I can't open them.....
This is the second map of your that makes error





scr2-png.353447
 
Level 12
Joined
Jan 30, 2020
Messages
875
Yes, Uncle didn't do anything wrong, UMSWE simply isn't suited for reforged like all other custom versions of WE that I have tried :)
I think many of us are hoping for an improved WE that would be, or even better, HiveWE - World Editor 0.7 when it will be released !
 
Status
Not open for further replies.
Top