• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Trying to make a certain buildings effects effect only one team

Status
Not open for further replies.
Level 6
Joined
Jul 22, 2008
Messages
243
You mean a passive reg?

Just use the neutral spell - reg something. And change the allowed targets?
 
Level 9
Joined
Nov 24, 2007
Messages
229
That might be it? I'm just gonna give you more detail so we know for sure.

It's like an AOS... Theres a castle... which is the enemy teams target to destroy... That also has health and mana regeneration...

So... As the enemies attack the castle... There also being healed which makes it nearly impossible to fend them off.

Does that help?
 
Level 9
Joined
Jan 17, 2009
Messages
372
This is how i would do it
  • Actions
    • Set UnitGroup = (Units in (Playable map area) matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an ally of <Your Player>) Equal to True)))
    • Unit Group - Pick every unit in UnitGroup and do (Actions)
      • Loop - Actions
        • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + <Your Value>)
    • Custom script: call DestroyGroup(udg_UnitGroup)
Set Your Player to the Computer that owns the Castle or if Neutral Passive owns the Castle, set it the the first player in Team 1 or the first player in Team 2
Set Your Value to the amount of Hitpoints you would like to be healed.

I think that is what you want but if not this is what you do make a copy of Life Regeneration Aura (Neutral) and check the "Friend" box in Targets Allowed, do the same thing to Mana Regeneration Aura (Neutral) and add those ablilities to your castle
 
That's not the same with what you said within the first post :p
In the first post you asked for a regeneration ability of type Fountain of Life and now you want a damage detection system.
Well, since i assume that the castles are pre-set in the map (via the World Editor and not by triggers), you can have this:

  • Trigger
  • Events
    • Unit - Castle0001 <gen> takes damage [Unit - Specific Unit event]
  • Conditions
    • ((Damage Source) belongs to an enemy of (Owner of (Castle0001)) Equal to True [Player Comparison]
  • Actions
    • Unit - Set life of (Damage Source) to (((Life of (Damage Source)) + X) [Unit - Set life (to Value), place the healing you want done in the position of the "X"]
You will do the same thing for the other castle. Even if it doesn't make that much of sense to me, this is what i think you want; if not, be more specific even.
 
Status
Not open for further replies.
Top