• 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 with message and tower

Status
Not open for further replies.
Level 2
Joined
Feb 13, 2013
Messages
7
Hi all

is there some way to kill/remove/explode selected unit if its owner type, for example, -kill?

and

i have base next to enemy base. Between us is cliff, for example. If i build tower closely to it, it will attack to them (if i gain vision of course). Can i somehow stop attack through the hill? (pathing blocker and boundary don´t work)

thx.
 
Level 7
Joined
Nov 15, 2009
Messages
225
Hey!

is there some way to kill/remove/explode selected unit if its owner type, for example, -kill?
  • Click
    • Events
      • Player - Player 1 (Red) types a chat message containing -kill as An exact match
      • Player - Player 2 (Blue) types a chat message containing -kill as An exact match
      • Player - Player 3 (Teal) types a chat message containing -kill as An exact match
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Picked unit)) Equal to (Triggering player)
            • Then - Actions
              • Unit - Kill (Picked unit)
            • Else - Actions
have base next to enemy base. Between us is cliff, for example. If i build tower closely to it, it will attack to them (if i gain vision of course). Can i somehow stop attack through the hill? (pathing blocker and boundary don´t work)
  • PreventAttack
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set TempPoint = (Position of (Attacked unit))
      • Set TempPoint2 = (Position of (Attacking unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Terrain cliff level at TempPoint) - (Terrain cliff level at TempPoint2)) Greater than 0
        • Then - Actions
          • Unit - Order (Attacking unit) to Stop
        • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call RemoveLocation(udg_TempPoint2)
TempPoint = Point variable TempPoint2 = Point variable

Check the map if you want.
 

Attachments

  • click.w3x
    17.6 KB · Views: 44
Last edited:
Status
Not open for further replies.
Top