[Solved]Neutral Equals Ally?

Status
Not open for further replies.

FalseDestiny

Level 2
Hi. I have this trigger...
• [Actions]
• ...
• For each (Integer A) from 1 to 12, do (Actions)
• Loop - Actions
• Set porttotal[(Integer A)] = ((Number of living Port units owned by (Player((Integer A)))) + ((Number of living Trade Port units owned by (Player((Integer A)))) x 3))
• For each (Integer A) from 1 to 12, do (Actions)
• For each (Integer A) from 1 to 12, do (Actions)
• Loop - Actions
• For each (Integer B) from 1 to 12, do (Actions)
• Loop - Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• (Integer A) Not equal to (Integer B)
• ((Player((Integer A))) is an enemy of (Player((Integer B)))) Not equal to True
• ((Player((Integer A))) is an ally of (Player((Integer B)))) Equal to True
• Then - Actions
• Set tradeincome[(Integer A)] = ((porttotal[(Integer A)] + porttotal[(Integer B)]) x 1)
• Set tradeincome[(Integer B)] = ((porttotal[(Integer A)] + porttotal[(Integer B)]) x 1)
• Else - Actions
• Do nothing

The idea is that if a player is an Ally of a player (With or without vision), then the income trigger above fires, giving gold to both players. However, a separately triggered command called "-embargo" changes the alliance settings between each player to "Neutral." The idea is, if the players are neutral the trigger doesn't apply when the trigger reaches their player numbers.

However my testing makes it do so anyway, giving players gold regardless of the number of embargoes.

Any ideas on how to fix this? The game uses all 12 players. Thanks for any help.

Fox536

Level 3
Here try this it should fix your problem, plus I added a couple of fixes you might want to use, it'll help you out later lol

• Actions
• -------- Use Loop through Playergroup to avoid using both your Global Loop Vars, you might need them later lol --------
• Player Group - Pick every player in (All players) and do (Actions)
• Loop - Actions
• For each (Integer A) from 1 to 12, do (Actions)
• Loop - Actions
• -------- Use these conditions and it should work --------
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• (Picked player) Not equal to (Player((Integer A)))
• Or - Any (Conditions) are true
• Conditions
• ((Picked player) is giving (Player((Integer A))) Alliance (non-aggression)) Equal to True
• ((Picked player) is giving (Player((Integer A))) Shared vision) Equal to True
• ((Picked player) is giving (Player((Integer A))) Shared units) Equal to True
• ((Picked player) is giving (Player((Integer A))) Full shared units) Equal to True
• Then - Actions
• -------- You don't want to do players at the same time or it'll double the amount that they get --------
• Set tradeIncome[(Player number of (Picked player))] = (portTotal[(Player number of (Picked player))] + portTotal[(Integer A)])
• Player - Add portTotal[(Player number of (Picked player))] to (Picked player) Current gold
• Else - Actions

FalseDestiny

Level 2
Thanks Fox, that solved the issue!

Fox536

Level 3
No problem glad I could help

Status
Not open for further replies.

Replies
3
Views
489
Replies
5
Views
739
Replies
5
Views
736
Replies
2
Views
574
[Trigger] Check GUI Triggers
Replies
5
Views
712