Leave Ownership Trigger

crazyperson

New Member
Reaction score
0
Trigger:
  • controlleave
    • Events
      • Player - Player 1 (Red) leaves the game
      • Player - Player 2 (Blue) leaves the game
      • Player - Player 3 (Teal) leaves the game
      • Player - Player 4 (Purple) leaves the game
      • Player - Player 5 (Yellow) leaves the game
      • Player - Player 6 (Orange) leaves the game
      • Player - Player 7 (Green) leaves the game
      • Player - Player 8 (Pink) leaves the game
      • Player - Player 9 (Gray) leaves the game
      • Player - Player 10 (Light Blue) leaves the game
    • Conditions
    • Actions
      • Set TempGroup = (Units in (Playable map area) owned by (Triggering player))
      • Set TempPGroup = (All players matching ((((Matching player) slot status) Equal to Is playing) and ((((Matching player) controller) Equal to User) and ((Matching player) Equal to (Random player from (All allies of (Triggering player)))))))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Unit - Change ownership of (Picked unit) to (Random player from TempPGroup) and Change color
      • Custom script: call DestroyGroup(udg_TempGroup)
      • Custom script: call DestroyForce(udg_TempPGroup)


Here is the problem with the trigger:

The trigger is suppose to randomly assign ownership of the leaver's building to the remaining players beside 11,12. But it only assigns it to one person.

I would also like the trigger to only affect buildings not units like hero/builders.

Thanks in advance.
 

BlueMirage

Trust, but doubt.
Reaction score
39
((Matching player) Equal to (Random player from (All allies of (Triggering player)
Here's your problem.
One random player = 1 player

It should be: Matching player is an ally of triggering player.
That should fix it.
 

crazyperson

New Member
Reaction score
0
I'm not sure how do I do this:

Add all units of type XXX instead of All units, this will help you grab buildings.

Do I have to add all the different kind of buildings? Which part should I change? Can you show me the trigger?

What I have so far:
Trigger:
  • controlleave
    • Events
      • Player - Player 1 (Red) leaves the game
      • Player - Player 2 (Blue) leaves the game
      • Player - Player 3 (Teal) leaves the game
      • Player - Player 4 (Purple) leaves the game
      • Player - Player 5 (Yellow) leaves the game
      • Player - Player 6 (Orange) leaves the game
      • Player - Player 7 (Green) leaves the game
      • Player - Player 8 (Pink) leaves the game
      • Player - Player 9 (Gray) leaves the game
      • Player - Player 10 (Light Blue) leaves the game
    • Conditions
    • Actions
      • Set TempGroup = (Units in (Playable map area) owned by (Triggering player))
      • Set TempPGroup = (All players matching ((((Matching player) slot status) Equal to Is playing) and ((((Matching player) controller) Equal to User) and (((Matching player) is an ally of (Triggering player)) Equal to True))))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Unit - Change ownership of (Picked unit) to (Random player from TempPGroup) and Change color
      • Custom script: call DestroyGroup(udg_TempGroup)
      • Custom script: call DestroyForce(udg_TempPGroup)
 

Komaqtion

You can change this now in User CP.
Reaction score
469
This is the stuff you want :p

Trigger:
  • Set TempGroup = (Units owned by (Triggering player) matching (((Matching unit) is A structure) Equal to True))


It's called "Units Owned By Player Matching Condition" ;)
 

crazyperson

New Member
Reaction score
0
This is the stuff you want :p

Trigger:
  • Set TempGroup = (Units owned by (Triggering player) matching (((Matching unit) is A structure) Equal to True))


It's called "Units Owned By Player Matching Condition" ;)

Thanks everybody - I hope it works will test soon.
 

jig7c

Stop reading me...-statement
Reaction score
123
This is the stuff you want :p

Trigger:
  • Set TempGroup = (Units owned by (Triggering player) matching (((Matching unit) is A structure) Equal to True))


It's called "Units Owned By Player Matching Condition" ;)

err... whats wrong with this one?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top