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:
And the messy bit that stops the trigger from working at all but does show what i'm sort of trying to get at:
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.
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
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
- Events
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
- Conditions
- Or - Any (Conditions) are true
- Then - Actions
- Special Effect - Destroy SFX
- Unit - Remove Dummy from the game
- Else - Actions
- If - Conditions
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