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

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.
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
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.
Top