• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Switch killzone help

Status
Not open for further replies.
Level 2
Joined
Jul 24, 2009
Messages
14
I am not the best with world edit, but i was wondering how to make it so that when a unit walks on a switch everyone in another region gets killed.
 
  • Untitled Trigger 003
    • Events
      • Unit - A unit enters Platform <gen>
    • Conditions
    • Actions
      • Set Temp_Group_1 = (Units in Kill Region <gen>)
      • Unit Group - Pick every unit in Temp_Group_1 and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
      • Custom script: call DestroyGroup(udg_Temp_Group_1)
Create "Platform" region, set it over the switch. Create Kill Region where you want to kill units.
 
To make your switch animate, you can add to that
  • Destructible - Set height of (<Switch>) to 0
Where <Switch> is the switch destructible.

To make the switch go back up again, you can use:
  • SwitchUp
    • Events
      • Unit - A unit leaves (Platform <gen>)
    • Conditions
      • (Number of units in (Units in (Platform <gen>))) Equal to 0
    • Actions
      • Destructible - Set height of (<Switch>) to 1
This will make it so that the switch goes back to looking "unpressed" when nobody is standing on it anymore.
 
Status
Not open for further replies.
Back
Top