• 🏆 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] Simple Ownership issue?

Status
Not open for further replies.
Level 1
Joined
Oct 4, 2008
Messages
1
Seems simple enough but I'm having trouble with the events and conditions.
I'm trying to have a circle of power that, when its life becomes less than 80, will change ownership and color to the attacking unit. The owner of the circle of power receives 20 gold every 60 seconds.
If red takes over the circle of power, he receives 20 gold every 60 seconds, but I'm having trouble with having a second player (blue) take ownership of the circle of power if red already owns it.

The trigger I have looks something like this,

Event-
Circle of Power's life becomes less than 80.
Condition- Player Comparison
(Owner of {attacking unit}) Equal to Player 1 (Red)
Event-Unit
Change ownership of Circle of Power to Player 1 (Red) and change color.
Set life of Circle of Power to 100.00%

I set the same trigger for player 2 (blue), and when the circle of power is attacked by blue when red controls it, it just refreshes the life percentage without changing ownership.
I've tried race comparison, but I end up with the same issue.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Events:
Circle of power takes damage
Conditions:
Life of circle of power less than or equal to 80
Actions:
Change ownership of Circle of Power to Player (Owner of (Damaging Unit)) and change color.
Set life of Circle of Power to 100.00%
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
  • WTF
  • -------- Trigger tags are supposed to be used for things copied out of the GUI, not for something written by hand, but if you insist, there you go --------
  • -------- Oh, I have an idea: why don't we use them all the time... --------
  • -------- Might as well throw in a few other tags --------
 
Status
Not open for further replies.
Top