• 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.

Removing units in a region after pressing key

Status
Not open for further replies.
Level 3
Joined
Jun 18, 2008
Messages
30
I'm making a simple map, but fun one.
I need a trigger that goes as follows, but I cant figure out how to create one.
Either:
Event: Player presses left arrow key
Action: remove all units in region

Or

Event: Player presses Z
Action: remove all units in region.

An image:

|o| | || |
|o|o|o|o|

When the only o above the others gets on top of another o, I want it so that if you press either z or the left arrow key, it removes it from the game.

Anyone got any suggestions.
If not I'm, stuck! :cry:
 
Level 15
Joined
Sep 3, 2006
Messages
1,738
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) Presses the Left Arrow key
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
 
I'm making a simple map, but fun one.
I need a trigger that goes as follows, but I cant figure out how to create one.
Either:
Event: Player presses left arrow key
Action: remove all units in region

Or

Event: Player presses Z
Action: remove all units in region.

An image:

|o| | || |
|o|o|o|o|

When the only o above the others gets on top of another o, I want it so that if you press either z or the left arrow key, it removes it from the game.

Anyone got any suggestions.
If not I'm, stuck!

Is this game works like O2jam ? I don't really get what's you're saying but if what you mean is like O2jam, hitting the note..You can make it like this

Make an aura skill for the "o" and make a buff for it.

  • The Trigger You Made
    • Events
      • Player - Player 1 (Red) Presses the Left Arrow key
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Unit - Kill Units Matching Condition ((Unit has buff TIMETOHIT(TheBuffYouMade)))
Hope it helps you. :smile:
 
Level 3
Joined
Jun 18, 2008
Messages
30
Allright... Now what?

  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) Presses the Left Arrow key
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)

Allright, that works, only one issue.
I dont want it to destroy my circle of power there, its kind of my marker.
Any other suggestions?
 
Level 17
Joined
May 6, 2008
Messages
1,598
Pick every units in x region matching (unit) not equal to (your name of circle of power)
 
Level 17
Joined
May 6, 2008
Messages
1,598
  • Kill
    • Events
      • Player - Player 1 (Red) Presses the Left Arrow key
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in Left <gen> matching ((Unit-type of (Matching unit)) Not equal to Footman)) and do (Actions)
        • Loop - Actions
          • Unit - Explode (Picked unit)
 
Status
Not open for further replies.
Top