![]() |
|
|
#1 |
|
Major
Join Date: May 2005
Location: Yorkshire, UK
Posts: 686
|
Is this the correct for a trigger to fire if any things are NOT true?
I want an event to fire if Germany loses control of any of the Atlantic coast of France. Will this do it?
Trigger = { or = { not = control = { province = 43 data = GER } #Dunkerque not = control = { province = 18 data = GER } #Calais not = control = { province = 42 data = GER } #Dieppe not = control = { province = 41 data = GER } #Le Harve not = control = { province = 39 data = GER } #Caen not = control = { province = 38 data = GER } #Cherbourg not = control = { province = 37 data = GER } #Avranches not = control = { province = 33 data = GER } #Rennes not = control = { province = 32 data = GER } #Brest not = control = { province = 34 data = GER } #Lorient not = control = { province = 35 data = GER } #Nantes not = control = { province = 59 data = GER } #Cholet not = control = { province = 323 data = GER } #La Rochelle not = control = { province = 325 data = GER } #Bordeaux not = control = { province = 326 data = GER } #Dax } } or should it have more brackets like this? Trigger = { or = { {not = control = { province = 43 data = GER }} #Dunkerque {not = control = { province = 18 data = GER }} #Calais {not = control = { province = 42 data = GER }} #Dieppe {not = control = { province = 41 data = GER }} #Le Harve {not = control = { province = 39 data = GER }} #Caen {not = control = { province = 38 data = GER }} #Cherbourg {not = control = { province = 37 data = GER }} #Avranches {not = control = { province = 33 data = GER }} #Rennes {not = control = { province = 32 data = GER }} #Brest {not = control = { province = 34 data = GER }} #Lorient {not = control = { province = 35 data = GER }} #Nantes {not = control = { province = 59 data = GER }} #Cholet {not = control = { province = 323 data = GER }} #La Rochelle {not = control = { province = 325 data = GER }} #Bordeaux {not = control = { province = 326 data = GER }} #Dax } } or should the or and the not be the other way round? Thanks in advance for your help
|
|
|
|
|
|
#2 |
|
Major
|
Code:
Trigger = {
or = {
NOT = {
control = { province = 43 data = GER } #Dunkerque
control = { province = 18 data = GER } #Calais
control = { province = 42 data = GER } #Dieppe
control = { province = 41 data = GER } #Le Harve
control = { province = 39 data = GER }
#Caen
control = { province = 38 data = GER } #Cherbourg
control = { province = 37 data = GER } #Avranches
control = { province = 33 data = GER } #Rennes
control = { province = 32 data = GER } #Brest
control = { province = 34 data = GER } #Lorient
control = { province = 35 data = GER } #Nantes
control = { province = 59 data = GER } #Cholet
control = { province = 323 data = GER } #La Rochelle
control = { province = 325 data = GER } #Bordeaux
control = { province = 326 data = GER } #Dax
}
}
}
It should work that way... if not, try this: Code:
Trigger = {
or = {
not = { control = { province = 43 data = GER }} #Dunkerque
not = { control = { province = 18 data = GER }} #Calais
not ={ control = { province = 42 data = GER }} #Dieppe
not ={ control = { province = 41 data = GER }} #Le Harve
not ={ control = { province = 39 data = GER }}
#Caen
not ={ control = { province = 38 data = GER }} #Cherbourg
not ={ control = { province = 37 data = GER }} #Avranches
not ={ control = { province = 33 data = GER }} #Rennes
not ={ control = { province = 32 data = GER }} #Brest
not ={ control = { province = 34 data = GER }} #Lorient
not ={ control = { province = 35 data = GER }} #Nantes
not ={ control = { province = 59 data = GER }} #Cholet
not ={ control = { province = 323 data = GER }} #La Rochelle
not ={ control = { province = 325 data = GER }} #Bordeaux
not ={ control = { province = 326 data = GER }} #Dax
}
}
|
|
|
|
|
|
#3 |
|
Major
Join Date: May 2005
Location: Yorkshire, UK
Posts: 686
|
Black Guardian's 2nd suggestion is the one that works.
Thank you Black Guardian So I now have ################################################## ################################################## #################### # # Events to show effects on Vichy of D-day and Overlord # ################################################## ################################################## #################### ############################################# # After D-day, Vichy begins to slowly implode ############################################# event = { id = 800100 random = no country = VIC persistent = no Trigger = { or = { not = { control = { province = 43 data = GER }} #Dunkerque not = { control = { province = 18 data = GER }} #Calais not = { control = { province = 42 data = GER }} #Dieppe not = { control = { province = 41 data = GER }} #Le Harve not = { control = { province = 39 data = GER }} #Caen not = { control = { province = 38 data = GER }} #Cherbourg not = { control = { province = 37 data = GER }} #Avranches not = { control = { province = 33 data = GER }} #Rennes not = { control = { province = 32 data = GER }} #Brest not = { control = { province = 34 data = GER }} #Lorient not = { control = { province = 35 data = GER }} #Nantes not = { control = { province = 59 data = GER }} #Cholet not = { control = { province = 323 data = GER }} #La Rochelle not = { control = { province = 325 data = GER }} #Bordeaux not = { control = { province = 326 data = GER }} #Dax } random = 50 } date = { day = 1 month = january year = 1941 } offset = 1 deathdate = { day = 29 month = december year = 1947 } name = "After the successful Allied landing on the coast of France, Vichy starts to slowly implode." desc = "" style = 0 action_a = { name = "OK" command = { type = dissent value = 4 } command = { type = manpowerpool value = -12 } command = { type = money value = -70 } #command = { type = trigger which = 800116 } #command = { type = trigger which = 800117 } #command = { type = trigger which = 800118 } #command = { type = trigger which = 800119 } } } Lots more things left to discover yet! |
|
|
|
|
|
#4 |
|
On loan to the C.S Navy
![]() ![]()
Join Date: Jun 2004
Location: Great Britain
Posts: 4,327
|
The basic rule is for every '{' there has to be a '}'
And you only need one NOT command when specifying provinces in a trigger. |
|
|
|
|
|
#5 |
|
Major
Join Date: May 2005
Location: Yorkshire, UK
Posts: 686
|
Hmmh, I expect you are correct, but I can't get it to fire only 1 NOT command, must be doing something wrong. But the way I have it now, it does fire.
Can you show an example please? Thanks. |
|
|
|
|
|
#6 |
|
On loan to the C.S Navy
![]() ![]()
Join Date: Jun 2004
Location: Great Britain
Posts: 4,327
|
This is the trigger for one of my events, it uses the OR command but the principle is the same-
event = { id = 50007 random = no country = USA trigger = { atwar = no exists = U00 OR = { control = { province = 640 data = USA } control = { province = 641 data = USA } control = { province = 720 data = USA } control = { province = 721 data = USA } control = { province = 713 data = USA } control = { province = 714 data = USA } } NOT = { OR = { ispuppet = USA puppet = { country = U00 country = USA } } } } |
|
|
|
|
|
#7 | |
|
Field Marshal
![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2002
Location: Michigan, USA
Posts: 13,924
|
Quote:
Trigger = { not = { and = { control = { province = 43 data = GER } #Dunkerque control = { province = 18 data = GER } #Calais control = { province = 42 data = GER } #Dieppe control = { province = 41 data = GER } #Le Harve control = { province = 39 data = GER } #Caen control = { province = 38 data = GER } #Cherbourg control = { province = 37 data = GER } #Avranches control = { province = 33 data = GER } #Rennes control = { province = 32 data = GER } #Brest control = { province = 34 data = GER } #Lorient control = { province = 35 data = GER } #Nantes control = { province = 59 data = GER } #Cholet control = { province = 323 data = GER } #La Rochelle control = { province = 325 data = GER } #Bordeaux control = { province = 326 data = GER } #Dax } } random = 50 } De Morgan's laws in Paradox event trigger language: not = { and = { triggerA triggerB } } is equivalent to or = { not = { triggerA } not = { triggerB } } and not = { or = { triggerA triggerB } } is equivalent to and = { not = { triggerA } not = { triggerB } }
__________________
"The trouble with fighting for human freedom is that one spends most of one's time defending scoundrels. For it is against scoundrels that oppressive laws are first aimed, and oppression must be stopped at the beginning if it is to be stopped at all." --H. L. Mencken Victoria: Revolutions 2.01 (+new VIPR 0.3) HoI2 Anthology w/Mod34 EU3 Heir to the Throne beta patch 4.1b Download the Fix-it-Yourself Pack for HoI 1.06c (updated 11/14/05) |
|
|
|
|
|
|
#8 | |
|
Jehanne's Slave
![]() ![]() ![]() ![]() ![]() Join Date: Jul 2002
Location: One step further away from finding the key to Jehanne's chastity belt
Posts: 5,944
|
Quote:
well you learn something new every day on this forum. Ayeshteni
__________________
GLORIANA - A For the Glory Mod And no it isn't about Queen Lizzy before you ask ![]() Discussion thread for Gloriana Here Owner of a Golden Phoenix cookie!● Extremely Proud owner of a BiB cookie! ● I also have a very special Johan cookie as well ● Owner of 7 2Coaties "Why not? The primary causes for union are, thankfully, long gone. So why are we hanging on to it? For the sake of sentimentality? An uncertain economic argument that's easily dismissed? Nah. Go forth, Scots. All power to your elbow. You'll take the oil and we'll take the nukes, and we'll be in Brussels afore ye. And so on." - Rabid Bogling |
|
|
|
|
![]() |
| Thread Tools | |
|
|