• 🏆 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] Conquer player

Status
Not open for further replies.
Level 19
Joined
Sep 4, 2007
Messages
2,826
Hello! I'm currently working on a conquest system which will allow players to capture each other. Only problem is that when I try to capturing more than one players they won't become allies with each other but only me. How can I fix this?

In other words: I become their ally and they become mine but they don't become each others allies.
Thanks in advance.
  • Conqure Player
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Attacked unit) is A town-hall-type unit) Equal to True
          • (Life of (Attacked unit)) Less than or equal to ConqureHitpoint
    • Actions
      • -------- Restore Townhall --------
      • Set Player = (Owner of (Attacked unit))
      • Game - Display to (All players) the text: ((MultiboardColor[(Player number of (Owner of (Attacking unit)))] + (Name of (Owner of (Attacking unit)))) + ( |cffffcc99has conqured + (MultiboardColor[(Player number of Player)] + (Name of Player))))
      • Unit - Set life of (Attacked unit) to 10000.00
      • -------- Captured player unallies his former allies --------
      • Set TempPlayerGroup = (All players)
      • Player Group - Pick every player in TempPlayerGroup and do (Actions)
        • Loop - Actions
          • Player - Make (Picked player) treat Player as an Enemy
          • Player - Make Player treat (Picked player) as an Enemy
          • Player - Make Player 12 (Brown) treat Player as an Ally with shared vision
      • Custom script: call DestroyForce(udg_TempPlayerGroup)
      • -------- Ally with conquering player group --------
      • Set TempPlayerGroup = (Player group((Owner of (Attacking unit))))
      • Player Group - Pick every player in TempPlayerGroup and do (Actions)
        • Loop - Actions
          • Player - Make (Picked player) treat Player as an Ally with shared vision
          • Player - Make Player treat (Picked player) as an Ally with shared vision
          • Player - Change color of Player to (Color of (Owner of (Attacking unit))), Changing color of existing units
      • Custom script: call DestroyForce(udg_TempPlayerGroup)
 
Level 2
Joined
Feb 21, 2008
Messages
18
I don´t understand why you first make:
all tread all as enemy
and then in the ---Ally with conquering player group --- part
you should not make pick all in player group but ally of player because you don´t add the player to player group you only let him tread as ally

when you know what i mean
there the problem could be
 
Status
Not open for further replies.
Top