• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Help Trigger Unit Group

Status
Not open for further replies.
Level 4
Joined
Jul 12, 2011
Messages
67
Hi, basically what im trying to do is make all units turn into zombies when I destroy a destructible. However, the way Im doing it is makeing a separate trigger/action for each unit I want converted, and that seems wrong.

So how do I make all units a region turn into zombies?

PS Im new (like less than an hour) to making triggers... so please explain as if it were to a 5 years old :D
k thnks bai
 
Level 4
Joined
Jul 12, 2011
Messages
67
yes there is only one "triggering destructible" on the map.
However instead of replacing the units, it just creates a very large group of zombies around the selected unit. What am I doing wrong? My trigger looks exaclltly like pharoah example

PS thank you for the extremely quick responeses :D
------
EDIT: Nevermind! THANK YOU I found the mistake! Awesome cant wait to learn more :D
 
Level 8
Joined
Jul 3, 2011
Messages
251
A very large group of zombies around each unit? Wait a minute or two please and i'll have the triggers for you.

EDIT: Ok here are your triggers, fill in the event, the region the unit group is picking units from and the zombie type unit, if you are creating the units for a player or are using a player as an enemy, change player 12 (brown) to that player, otherwise you can change it to neutral passive.
  • Zombie Effect
    • Events
      • Destructible - YourDestructible dies
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in YourRegion) and do (Actions)
        • Loop - Actions
          • Set Temp_Point = (Position of (Picked unit))
          • Set Temp_Unit = (Picked unit)
          • For each (Integer A) from 1 to 5, do (Actions)
            • Loop - Actions
              • Set Temp_Point2 = (Temp_Point offset by 50.00 towards (72.00 x (Real((Integer A)))) degrees)
              • Unit - Create 1 Zombie for Player 12 (Brown) at Temp_Point2 facing Temp_Point
              • Unit - Order (Last created unit) to Attack Temp_Unit
              • Custom script: call RemoveLocation (udg_Temp_Point2)
          • Custom script: call RemoveLocation (udg_Temp_Point)
 
Status
Not open for further replies.
Top