Flag is not triggered

Moderator: AlvaroSousa

Post Reply
User avatar
ncc1701e
Posts: 10717
Joined: Tue Oct 29, 2013 7:50 pm
Location: Utopia Planitia Fleet Yards

Flag is not triggered

Post 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?
Chancellor Gorkon to Captain James T. Kirk:
You don't trust me, do you? I don't blame you. If there is to be a brave new world, our generation is going to have the hardest time living in it.
User avatar
stjeand
Posts: 2666
Joined: Sun Jan 10, 2021 1:14 pm
Location: Aurora, NC

RE: Flag is not triggered

Post 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.
User avatar
ncc1701e
Posts: 10717
Joined: Tue Oct 29, 2013 7:50 pm
Location: Utopia Planitia Fleet Yards

RE: Flag is not triggered

Post 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.
Chancellor Gorkon to Captain James T. Kirk:
You don't trust me, do you? I don't blame you. If there is to be a brave new world, our generation is going to have the hardest time living in it.
User avatar
AlvaroSousa
Posts: 12016
Joined: Mon Jul 29, 2013 7:13 pm
Contact:

RE: Flag is not triggered

Post by AlvaroSousa »

You still need an if_date
Creator Kraken Studios
- WarPlan
- WarPlan Pacific

Designer Strategic Command
- Brute Force (mod) SC2
- Assault on Communism SC2
- Assault on Democracy SC2
- Map Image Importer SC3
User avatar
ncc1701e
Posts: 10717
Joined: Tue Oct 29, 2013 7:50 pm
Location: Utopia Planitia Fleet Yards

RE: Flag is not triggered

Post by ncc1701e »

Well, I have tested it. It works like above without if_date.
Chancellor Gorkon to Captain James T. Kirk:
You don't trust me, do you? I don't blame you. If there is to be a brave new world, our generation is going to have the hardest time living in it.
User avatar
AlvaroSousa
Posts: 12016
Joined: Mon Jul 29, 2013 7:13 pm
Contact:

RE: Flag is not triggered

Post by AlvaroSousa »

Shows you what I know. I must have put in a default date and forgot.
Creator Kraken Studios
- WarPlan
- WarPlan Pacific

Designer Strategic Command
- Brute Force (mod) SC2
- Assault on Communism SC2
- Assault on Democracy SC2
- Map Image Importer SC3
Post Reply

Return to “War Plan: Tech Support”