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

[Trigger] "-my area" Trigger

Status
Not open for further replies.
Level 9
Joined
Nov 24, 2007
Messages
229
Does anyone know of a trigger that allows a player destroy all allied towers in his specified area? Kind of like in Stronghold TD.

EX: Yellow builds in blues building area, so now blue types the command -my area and all yellows building within blues specified region are destroyed.

Can anyone help me out?
 
  • My Area
  • Events
    • Player - Player 1 (Red) types a chat message containing -my Area as An exact match
    • Player - Player 2 (Blue) types a chat message containing -my Area as An exact match
    • Player - Player 3 (Teal) types a chat message containing -my Area as An exact match
    • Player - Player 4 (Purple) types a chat message containing -my Area as An exact match
    • Player - Player 5 (Yellow) types a chat message containing -my Area as An exact match
    • Player - Player 6 (Orange) types a chat message containing -my Area as An exact match
    • Player - Player 7 (Green) types a chat message containing -my Area as An exact match
    • Player - Player 8 (Pink) types a chat message containing -my Area as An exact match
    • Player - Player 9 (Gray) types a chat message containing -my Area as An exact match
    • Player - Player 10 (Light Blue) types a chat message containing -my Area as An exact match
  • Conditions
  • Actions
    • Set MyAreaPoint = ((Triggering player) start location)
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units within Your_Number_Here of MyAreaPoint matching ((((Matching unit) is A structure) Equal to True) and ((Owner of (Matching unit)) Not equal to (Triggering player)))) and do (Actions)
      • Loop - Actions
        • Unit - Kill (Picked unit)
    • Custom script: call RemoveLocation(udg_MyAreaPoint)
 
How do you mean? And what type of map is this?

"Your Number Here" Was to be set to a certain value, but You could do it with a region also. It needs to modify the Initilization trigger.

  • Initilization
  • Events
    • Map initialization
  • Conditions
  • Actions
    • Set MyArea[1] = Red Region <gen>
    • Set MyArea[2] = Blue Region <gen>
    • Set MyArea[3] = Teal Region <gen>
  • ect...
  • My Area
  • Events
    • Player - Player 1 (Red) types a chat message containing -my Area as An exact match
    • Player - Player 2 (Blue) types a chat message containing -my Area as An exact match
    • Player - Player 3 (Teal) types a chat message containing -my Area as An exact match
    • Player - Player 4 (Purple) types a chat message containing -my Area as An exact match
    • Player - Player 5 (Yellow) types a chat message containing -my Area as An exact match
    • Player - Player 6 (Orange) types a chat message containing -my Area as An exact match
    • Player - Player 7 (Green) types a chat message containing -my Area as An exact match
    • Player - Player 8 (Pink) types a chat message containing -my Area as An exact match
    • Player - Player 9 (Gray) types a chat message containing -my Area as An exact match
    • Player - Player 10 (Light Blue) types a chat message containing -my Area as An exact match
  • Conditions
  • Actions
    • Set MyAreaPoint = ((Triggering player) start location)
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units in MyArea[(Player number of (Triggering player))] matching ((((Matching unit) is A structure) Equal to True) and ((Owner of (Matching unit)) Not equal to (Triggering player)))) and do (Actions)
      • Loop - Actions
        • Unit - Kill (Picked unit)
 
Status
Not open for further replies.
Top