Can't change team

feelingparty

New Member
Reaction score
3
***SOLVED***

I'm trying to make so that when a special unit is killed the killing unit claims the dying player for his team. I can't make it work though. I'm posting the triggers. If anybody knows what's wrong I'd appreciate his help.

Triggers:
Trigger:
  • FortresDies
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Footman
    • Actions
      • Player Group - Pick every player in (All allies of (Owner of (Dying unit))) and do (Actions)
        • Loop - Actions
          • Player - Make (Picked player) treat (Owner of (Dying unit)) as an Enemy
          • Player - Make (Owner of (Dying unit)) treat (Picked player) as an Enemy
        • Player - Make (Owner of (Dying unit)) treat (Owner of (Killing unit)) as an Ally with shared vision
      • Player Group - Pick every player in (All allies of (Owner of (Killing unit))) and do (Actions)
        • Loop - Actions
          • Player - Make (Owner of (Dying unit)) treat (Picked player) as an Ally with shared vision
          • Player - Make (Picked player) treat (Owner of (Dying unit)) as an Ally with shared vision
        • Else - Actions


What happens is that the teams stay exactly the same - You allies are still your allies (shared sight, don't attack you, yellow selections) as well as your enemies are still your enemies (no sight, attack you, red sellections)
 

Igor_Z

You can change this now in User CP.
Reaction score
61
Hmm. I think you should try it this way... It should work and it should be MUI i.e when many units die at the same time it probably won't malfunction...

Trigger:
  • Footman Dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
      • ((Owner of (Triggering unit)) is an enemy of (Owner of (Killing unit))) Equal to True
    • Actions
      • Set X_Killing_Unit = (Killing unit)
      • Set X_Dying_Unit = (Triggering unit)
      • Set X_Owner_of_KUnit = (Owner of X_Killing_Unit)
      • Set X_Owner_of_DUnit = (Owner of X_Dying_Unit)
      • Set X_Allies = (All players matching ((((Matching player) controller) Equal to User) and ((((Matching player) slot status) Equal to Is playing) and (((Matching player) is an ally of (Owner of X_Dying_Unit)) Equal to True))))
      • Set X_Enemies = (All players matching ((((Matching player) controller) Equal to User) and ((((Matching player) slot status) Equal to Is playing) and (((Matching player) is an ally of (Owner of X_Killing_Unit)) Equal to True))))
      • Player Group - Pick every player in X_Allies and do (Actions)
        • Loop - Actions
          • Player - Make (Picked player) treat X_Owner_of_DUnit as an Enemy
          • Player - Make X_Owner_of_DUnit treat (Picked player) as an Enemy
      • Custom script: call DestroyForce(udg_X_Allies)
      • Player Group - Pick every player in X_Enemies and do (Actions)
        • Loop - Actions
          • Player - Make (Picked player) treat X_Owner_of_DUnit as an Ally with shared vision
          • Player - Make X_Owner_of_DUnit treat (Picked player) as an Ally with shared vision
      • Custom script: call DestroyForce(udg_X_Enemies)
 

feelingparty

New Member
Reaction score
3
Thanx Igor Z. The problem was actually in the fact that I was testing my map instead of running it via wc3 and that means no players but Player 1 (Red) which somehow bugged the triggers. Anyway thanx for the reply.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    Happy Sunday!
    +1
  • The Helper The Helper:
    I will be out of town until Sunday evening
    +1
  • The Helper The Helper:
    I am back! Did you miss me LOL
    +1
  • jonas jonas:
    where did you go?
  • The Helper The Helper:
    Jefferson TX on a Paranormal Investigation of a haunted bed and breakfast - I got some friends that are paranormal investigators and they have an RV and do YouTubes
    +1
  • The Helper The Helper:
    It was a lot of fun. The RV was bad ass
  • jonas jonas:
    That sounds like fun!
    +1
  • The Helper The Helper:
    it was a blast!
  • The Helper The Helper:
    I am going to post the Youtube of the investigation in the forums when it is ready
    +1
  • jonas jonas:
    cool!
  • vypur85 vypur85:
    Sounds cool TH.
  • tom_mai78101 tom_mai78101:
    I was on a Legend of Zelda marathon...
  • tom_mai78101 tom_mai78101:
    Am still doing it now
    +1
  • jonas jonas:
    which one(s) are you playing?
  • jonas jonas:
    I played a little bit of the switch title two weeks ago and found it quite boring
  • The Helper The Helper:
    just got back from San Antonio this weekend had the best Buffalo Chicken Cheesesteak sandwhich in Universal City, TX - place was called Yous Guys freaking awesome! Hope everyone had a fantastic weekend!
    +1
  • The Helper The Helper:
    Happy Tuesday!
  • The Helper The Helper:
    We have been getting crazy numbers reported by the forum of people online the bots are going crazy on us I think it is AI training bots going at it at least that is what it looks like to me.
  • The Helper The Helper:
    Most legit traffic is tracked on multiple Analytics and we have Cloud Flare setup to block a ton of stuff but still there is large amount of bots that seem to escape detection and show up in the user list of the forum. I have been watching this bullshit for a year and still cannot figure it out it is drving me crazy lol.
    +1
  • Ghan Ghan:
    Beep boop
    +1
  • The Helper The Helper:
    hears robot sounds while 250 bots are on the forum lol
  • The Helper The Helper:
    Happy Saturday!
    +1
  • The Helper The Helper:
    and then it was Thursday...
    +2

    The Helper Discord

    Members online

    No members online now.

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top