Adding a Custom Birth Animation Via Trigger

Soup

New Member
Reaction score
0
Well i've been working on a map of mine i'd like to release some time soon, and it happened that I found a custom Building Birth model which I took a fancy to, and so I wanted to add this model to the buildings as they build. I've managed to do so, however there a few problems.

First problem. I want this trigger to only work when these buildings are built by a specific kind of worker, without having to make a separate new set of buildings just to add the special effect. Second thing i've got a problem with is removing the Dummy unit when the build is completed, or if it is destroyed or cancelled at any time from start of construction to end of construction.

This is my trigger so far:

Trigger:
  • ArcaneBuild
    • Events
      • Unit - A unit Finishes construction
      • Unit - A unit Cancels construction
      • Unit - A unit Begins construction
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Constructing structure)) Equal to Mage Tower
    • Actions
      • Custom script: local effect udg_SFX
      • Custom script: local unit udg_Building
      • Custom script: local unit udg_Dummy
      • Set Building = (Constructing structure)
      • Unit - Create 1 Dummy for Neutral Passive at (Position of Building) facing Default building facing (270.0) degrees
      • Set Dummy = (Last created unit)
      • Animation - Change Dummy's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
      • Special Effect - Create a special effect attached to the origin of Dummy using ABirth.MDX
      • Set SFX = (Last created special effect)
      • If (All Conditions are True) then do (Then Actions) else do (Else
And the messy bit that stops the trigger from working at all but does show what i'm sort of trying to get at:
Trigger:
  • Actions
    • If - Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Constructed structure) Equal to Building
          • (Cancelled structure) Equal to Building
          • (Dying unit) Equal to Building
    • Then - Actions
      • Special Effect - Destroy SFX
      • Unit - Remove Dummy from the game
    • Else - Actions
In the first part of the trigger the 3 events that aren't "Begins Construction" are meant for the conditions in the second bit which doesn't work when switched on. With the first part of the trigger exactly as it is, all of my "Mage Tower" buildings built get the dummy unit without fail and works properly, and once finished building the animation for the birth finishes and the dummy unit sits there without being removed.
MageTowers.jpg

This is 4 different stages, Top one is finished, one on the left is almost finished, one on the right was cancelled and bottom one is just started. Any help with this trigger would be appreciated!

-Soup
 

Rainther

I guess I should write something of value here...
Reaction score
61
Hmm, from what I know it's really hard to track the unit which builded the current building. Especially some of the races.
 

Soup

New Member
Reaction score
0
This is rather annoying, I hope the new patch doesn't destroy my trigger. Checking now.

Edit: Yup, the new patch messed over the method I was using. Looks like i'll have to redo it, if I can.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top