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

Triggered Birth Animation

Status
Not open for further replies.
I got this script from here: http://www.hiveworkshop.com/forums/...88/?prev=search=birth%20animation&d=list&r=20

It works great for any unit except when upgrading: ie town hall to a keep, etc. I've tried switching it to triggering unit, entering unit, and having a second script just for those structures. Ideas?

  • Birth Normal
    • Events
      • Unit - A unit Begins construction
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Constructing structure)) Equal to Orifice
          • (Unit-type of (Constructing structure)) Equal to Colony
          • (Unit-type of (Constructing structure)) Equal to Hive
          • (Unit-type of (Constructing structure)) Equal to Cell
          • (Unit-type of (Constructing structure)) Equal to Nest
          • (Unit-type of (Constructing structure)) Equal to Chamber
          • (Unit-type of (Constructing structure)) Equal to Brooder
          • (Unit-type of (Constructing structure)) Equal to Destor
    • Actions
      • Custom script: local effect udg_SeedSFX
      • Custom script: local unit udg_SeedBuilding
      • Set SeedBuilding = (Constructing structure)
      • Special Effect - Create a special effect attached to the origin of (Constructing structure) using zbtex.mdx
      • Set SeedSFX = (Last created special effect)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Constructing structure)) Equal to Orifice
        • Then - Actions
          • Wait 45.00 seconds
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Constructing structure)) Equal to Colony
            • Then - Actions
              • Wait 34.00 seconds
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of (Constructing structure)) Equal to Hive
                • Then - Actions
                  • Wait 34.00 seconds
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Unit-type of (Constructing structure)) Equal to Cell
                    • Then - Actions
                      • Wait 14.50 seconds
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of (Constructing structure)) Equal to Nest
                        • Then - Actions
                          • Wait 20.00 seconds
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Unit-type of (Constructing structure)) Equal to Chamber
                            • Then - Actions
                              • Wait 9.50 seconds
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Unit-type of (Constructing structure)) Equal to Brooder
                                • Then - Actions
                                  • Wait 25.00 seconds
                                • Else - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Unit-type of (Constructing structure)) Equal to Destor
                                    • Then - Actions
                                      • Wait 13.00 seconds
                                    • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Constructing structure) is alive) Equal to True
        • Then - Actions
          • Special Effect - Destroy SeedSFX
        • Else - Actions
          • Do nothing
 
Well, once the upgrade for your unit has finished (e.g. Keep), set the custom value to 1.
  • Trigger1
  • Events
    • Unit - A unit finishes an upgrade
  • Conditions
    • (Unit-type of (Triggering unit)) Equal to Town Hall
  • Actions
    • Unit - Set custom value of (Triggering unit) to 1
And, in the trigger of yours, have a condition (Integer Comparison): "(Custom value of (Triggering unit)) Equal to 1" then (Actions)
 
Status
Not open for further replies.
Top