• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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