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

I've met with a problem, and I need help solving it.

Status
Not open for further replies.
Level 3
Joined
Aug 22, 2009
Messages
27
Usually, if we have a building for the players to destroy as an objective, but we have another set of players that are suppose to defend it. What if a defending player turns around and sabotage his/her team by destroying the building that they are suppose to protect?

Thus, I've tried to make a trigger which detects said sabotage attempts.. It has worked, but I am faced with one problem. The problem is that the system will only detect "direct attacks", that would mean ordering a unit to "attack" the building. The system, however, cannot detect other attacking ways such as "attack ground".

This is a problem, because if I can't make it detect attack ground, the system becomes useless. So I was wondering if anyone in the forum knows how to create a trigger that can detect an attack ground action that is harming said building. Only said building.

Many thanks in advance.
 
If you're not interested in a damage detecting system you could also use this
provided that the building is preplaced it.

  • Anti Sabo
    • Events
      • Unit - Base <gen> Takes damage
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Damage source) belongs to an ally of (Owner of (Base))) Equal to True
        • Then - Actions
          • Unit - Kill/Pause (Damage source)
          • Unit - Set life of Base <gen> to ((Life of Base <gen>) + (Damage taken))
        • Else - Actions
If not preplaced I believe you could do this:
  • Trigger - Add to Anti Sabo <gen> the event (Unit - Base Takes damage)
And you could set Base as soon as its finished making or however the main base is established.
 
Status
Not open for further replies.
Back
Top