Page 1 of 1

Flag is not triggered

Posted: Mon Jan 10, 2022 5:23 pm
by ncc1701e
What's wrong with this code?

//Germany Annexes Poland
$ChangeTerritory
if_Date=1/1/1939
if_Country=42
if_Surrender=true
actionCountry=42
targetCountry=6
lifespan=tillTrigger
xyArea=allHexes
changeBorders
addReportTo=All
text=Germany annexes Western Poland into Greater Germany.
flag=1
$End

This second event is not triggered despite the first one is working:

//USSR moves factories
$GiveResource
if_Flag=1
xyControl=233,73,Allies
actionCountry=4
lifespan=tillTrigger
xyArea=237,74,62
addReportTo=All
text=Soviet railed factories come online in the Urals.
$End

Is it a problem in the event writing?

RE: Flag is not triggered

Posted: Mon Jan 10, 2022 5:50 pm
by stjeand
I believe all events require a if_Date.

At least that is what I remember.

Though I have never played around with the flag setting as there is only 1 and I needed quite a few.

RE: Flag is not triggered

Posted: Mon Jan 10, 2022 6:44 pm
by ncc1701e
I have found the problem. The correct event is:

//USSR moves factories
$GiveResource
if_Flag=1
xyControl=233,73,Neutral
actionCountry=4
lifespan=tillTrigger
xyArea=237,74,62
addReportTo=All
text=Soviet railed factories come online in the Urals.
$End

Indeed USSR is Neutral at this point.

RE: Flag is not triggered

Posted: Mon Jan 10, 2022 10:42 pm
by AlvaroSousa
You still need an if_date

RE: Flag is not triggered

Posted: Tue Jan 11, 2022 4:09 am
by ncc1701e
Well, I have tested it. It works like above without if_date.

RE: Flag is not triggered

Posted: Tue Jan 11, 2022 10:30 am
by AlvaroSousa
Shows you what I know. I must have put in a default date and forgot.