Originally Posted by Pyritie
No no no. Okay. I'll give you an example.
You are making a map, and you have three buildings that need this birth model. One of them takes 20 seconds to build, one takes 30 seconds, and one takes 50 seconds. So then you do this:
SFX is a Special Effect variable and Building is a unit variable.
-
Events
-
Unit - A unit starts construction
-
Conditions
-
Or - Multiple Functions
-

(Unit type of (Constructing structure)) is equal to Tower (20secs)
-

(Unit type of (Constructing structure)) is equal to Tower (30secs)
-

(Unit type of (Constructing structure)) is equal to Tower (50secs)
-
Actions
-

Custom script: local effect udg_SFX
-

Custom script: local unit udg_Building
-

Set Building = (Constructing Structure)
-

Animation - Set vertex shading of Building to 100.00, 100.00, 100.00, 0.00
-

Special Effect - Create a special effect on the origin of Building using war3mapImported\UBirth.mdx [[or whatever the path of the birth model is]]
-

Set SFX = (Last created special effect)
-
If Then Else - Multiple Functions
-

If - Conditions
-


(Unit type of (Building)) is equal to Tower (20secs)
-

Then - Actions
-

Else
-


If Then Else - Multiple Functions
-



If - Conditions
-




(Unit type of (Building)) is equal to Tower (30secs)
-



Then - Actions
-



Else
-




If Then Else - Multiple Functions
-





If - Conditions
-






(Unit type of (Building)) is equal to Tower (50secs)
-





Then - Actions
-






Wait 50.00 seconds
-






Else
-







If Then Else - Multiple Functions
-








If - Conditions
-









(Building is alive) equal to True
-







Then - Actions
-








Special effect - Destroy SFX
-








Animation - Set vertex shading of Building to 100.00, 100.00, 100.00, 100.00
-




Else - Actions
Keep in mind that if the building is destroyed or if it is canceled, the building will be destroyed and so will the effect (but only if you attach it to the building, NOT make it at where the building is), even if the 20/30/50 seconds are not finished yet.