Hello,
I have problems with this trigger:
it's supposed that shared the gold of the player that leaves the game in equal parts for the allies, except the players computers. But sometimes it doesn't give gold for all the ally players... but always shows the exact amount of gold that it's up to each player. But for some players sometimes only show it but it don't give it.
What is wrong?
Thanks, i give +rep
PS: excuse me for my bad english
EDIT: I'm pretty sure that this line is that this bad.
Set tmpPlayerGroup = (All players matching ((((Matching player) controller) Equal to User) and ((((Matching player) slot status) Equal to Is playing) and (((Triggering player) is an ally of (Matching player)) Equal to True))))
What can be wrong in this line?
I have problems with this trigger:
Code:
GoldShare
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 tmpInteger = ((Triggering player) Current gold)
Set tmpIntegerlumber = ((Triggering player) Current lumber)
Set tmpPlayerGroup = (All players matching ((((Matching player) controller) Equal to User) and ((((Matching player) slot status) Equal to Is playing) and (((Triggering player) is an ally of (Matching player)) Equal to True))))
Player Group - Remove (Triggering player) from tmpPlayerGroup
Player Group - Pick every player in tmpPlayerGroup and do (Actions)
Loop - Actions
Player - Add (tmpInteger / (Number of players in tmpPlayerGroup)) to (Picked player) Current gold
Player - Add (tmpIntegerlumber / (Number of players in tmpPlayerGroup)) to (Picked player) Current lumber
Set tmpIntegershow = (tmpInteger / (Number of players in tmpPlayerGroup))
Set tmpIntegerlumbershow = (tmpIntegerlumber / (Number of players in tmpPlayerGroup))
Game - Display to (All allies of (Triggering player)) the text: (Tu parte de oro es: + ((|cffffcc00 + (String(tmpIntegershow))) + |r))
Game - Display to (All allies of (Triggering player)) the text: (Tu parte de Madera es: + (String(tmpIntegerlumbershow)))
it's supposed that shared the gold of the player that leaves the game in equal parts for the allies, except the players computers. But sometimes it doesn't give gold for all the ally players... but always shows the exact amount of gold that it's up to each player. But for some players sometimes only show it but it don't give it.
What is wrong?
Thanks, i give +rep
PS: excuse me for my bad english
EDIT: I'm pretty sure that this line is that this bad.
Set tmpPlayerGroup = (All players matching ((((Matching player) controller) Equal to User) and ((((Matching player) slot status) Equal to Is playing) and (((Triggering player) is an ally of (Matching player)) Equal to True))))
What can be wrong in this line?