Dear Hive,
I have following issue: I made a production building as well as a second version of it, which represents "Page 2" of the unit tab, since it was overfilled in the first production building. Now everytime the main production building is constructed it also creates a small/invisible "Page 2" version so the player can switch between them. Now I need to know how I could make a trigger, that removes this second page building when the main building is destroyed or killed. Since I only want the Page 2 Building belonging to the respective production building which is destroyed instead of every page 2 building on the map to disappear I tried to work with range, which unfortunately didn't work.
Thanks in advance.
I have following issue: I made a production building as well as a second version of it, which represents "Page 2" of the unit tab, since it was overfilled in the first production building. Now everytime the main production building is constructed it also creates a small/invisible "Page 2" version so the player can switch between them. Now I need to know how I could make a trigger, that removes this second page building when the main building is destroyed or killed. Since I only want the Page 2 Building belonging to the respective production building which is destroyed instead of every page 2 building on the map to disappear I tried to work with range, which unfortunately didn't work.
-
Self Destruction Instructor
-
Events
-
Unit - A unit Begins casting an ability
-
-
Conditions
-
(Ability being cast) Equal to Self Destruct (instructor)
-
-
Actions
-
Set VariableSet InstructorPage2_remove = (Units within 300.00 of (Position of (Casting unit)) matching (((Unit-type of (Triggering unit)) Equal to Instructor Page 2) and ((Owner of (Triggering unit)) Equal to (Owner of (Casting unit)))).)
-
Unit - Kill (Triggering unit)
-
Unit - Remove (Triggering unit) from the game
-
Unit Group - Pick every unit in InstructorPage2_remove and do (Unit - Remove (Picked unit) from the game)
-
Custom script: call DestroyGroup(udg_InstructorPage2_remove)
-
-
Thanks in advance.