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

[Trigger] Player color unally check not working

Status
Not open for further replies.
Level 5
Joined
Jan 5, 2008
Messages
145
alright basicly this trigger is activiated when a unit town hall hp comes below 100 . you all the attacking unit blah blah blah.

Heres the problem

Player Group: Pick Every Unit In All Players Matching Contions Owner Of Picked Units Color Not Equal TO The Owner Of The Attacking Players Color
Loop Actions:
If All Condions Are True Than: Owner Of Owner Of Attacked Unit Treat Pick Player As Enemy
Else Action:
Do Nothing

What did i do wrong? Seems to me everything is in working order but i may be missing something. Can anyone help?

EDIT
  • Change Color Tribe 1
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacked unit)) Equal to Fishermen Tribe Town
      • (Owner of (Attacking unit)) Not equal to (Owner of (Attacked unit))
      • (Life of (Attacked unit)) Less than or equal to 100.00
    • Actions
      • Game - Display to (All players) the text: ((Name of (Owner of (Attacked unit))) + ( Has Just Been Conquered By + (Name of (Owner of (Attacking unit)))))
      • Player - Make (Owner of (Attacking unit)) treat (Owner of (Attacked unit)) as an Ally with shared vision
      • Player - Make (Owner of (Attacked unit)) treat (Owner of (Attacking unit)) as an Ally with shared vision
      • Player Group - Make (All allies of (Owner of (Attacking unit))) treat (Player group((Owner of (Attacked unit)))) as an Ally with shared vision
      • Player Group - Make (Player group((Owner of (Attacked unit)))) treat (All allies of (Owner of (Attacking unit))) as an Ally with shared vision
      • -------- PROBLEM --------
      • Player Group - Pick every player in (All players matching ((Color of (Picked player)) Not equal to (Color of (Owner of (Attacking unit))))) and do (Actions)
        • Loop - Actions
          • Player - Make (Owner of (Attacked unit)) treat (Picked player) as an Enemy
      • -------- PROBLEM END --------
      • Player - Change color of (Owner of (Attacked unit)) to (Color of (Owner of (Attacking unit))), Changing color of existing units
      • Unit - Set life of (Attacked unit) to (Max life of (Attacked unit))
      • Player - Add 1000 to (Owner of (Attacked unit)) Current lumber
      • Player - Add 250 to (Owner of (Attacked unit)) Current gold
The Problem is Between The Comments That Say Problem.
And for more explaining. it is suppose to be a check to unally all players not equal to that players new color. to stop people who have changed from their orginal color to make sure they arent allyed to anyone that was on their old color. kinda like a empires trigger. there is also a thumbnail of the trigger to
 

Attachments

  • Trigger.jpg
    Trigger.jpg
    133 KB · Views: 65
Last edited:
Level 8
Joined
Aug 4, 2006
Messages
357
could you please explain further what you are trying to do? also, please proofread your post for typos. also, right click the name of your trigger in the trigger editor, copy as text, and paste it into your post in between trigger tags so it's easier to read.
 
Level 4
Joined
Jun 8, 2007
Messages
89
I would agree with putting in some Trigger tags, that would make it a lot easier to understand. However, am I correct to say that you have:
UnitA = Unit Attacking Town Center
PlayerA = Owner of UnitA
PickedUnits = (and this is where you lose me) Units with the same Player color as PlayerA
Unit2 = Attacked Unit
Player2 = Owner of Attacked Unit

and you want to set Player1 to be hostile to Player2?

Unless there is a motive of which I am unaware of (there probably is), couldn't you just bypass the player color part entirely? Or do you do something like have multiple players with units of the same color?

EDIT: I think your problem might have to do with the "PickedPlayer" reference, as unless I am missing it, you never use anything like pick all players.
Maybe you could try using your player as "Owner of Unit(Attacked Unit)" or something like that. I'd offer actual triggers, but I don't have my WE on me at the moment, sorry.
 
Status
Not open for further replies.
Top