Hi, I need some help brushing up on my boolean.
I'm trying to make a trigger so that an event will fire when a given country owns any 2 out of a group of 4 provinces, a bit similar to the Formation of Russia event.
I seem to be having some difficulty with the usages of the AND and OR operators.
I first tried something like this:
But i realised that this would only work if each of the coloured blocks was treated as one OR condition and each line within those blocks was treated as an AND operation.
I'm really quite unsure if its even possible to make such a trigger using the boolean limitations.
I'm trying to make a trigger so that an event will fire when a given country owns any 2 out of a group of 4 provinces, a bit similar to the Formation of Russia event.
I seem to be having some difficulty with the usages of the AND and OR operators.
I first tried something like this:
Code:
trigger = {
OR = { [COLOR=Red]owned = { province = A data = -1 } #If you own province A
OR = { #And if you own any of:
owned = { province = B data = -1 } #province B
owned = { province = C data = -1 } #province C
owned = { province = D data = -1 } #province D
}[/COLOR]
[COLOR=Yellow]owned = { province = B data = -1 } #Or if you own province B
OR = { #And if you own any of:
owned = { province = C data = -1 } #province C
owned = { province = D data = -1 } #province D
}[/COLOR]
[COLOR=Lime]owned = { province = C data = -1 } #Or if you own province C
owned = { province = D data = -1 } #And province D[/COLOR]
}
}
But i realised that this would only work if each of the coloured blocks was treated as one OR condition and each line within those blocks was treated as an AND operation.
I'm really quite unsure if its even possible to make such a trigger using the boolean limitations.
Last edited: