Gaaah!
(BTW, what did you use to get that screenshot?)
@IF
CityTaken
city=Veii
attacker=Anybody
defender=Romans
@THEN
Delay
delay=1
Flag
flag=0
who=Romans
State=On
Text
The Romans have lost control of Veii! Supplies will run out in 3 turns.
EndText
@ENDIF
@IF
CheckFlag
who=Romans
flag=0
State=On
@THEN
Delay
delay=1
Flag
flag=1
who=Romans
State=On
@ENDIF
@IF
CheckFlag
who=Romans
flag=1
State=On
@THEN
Delay
delay=1
Flag
flag=2
who=Romans
State=On
@ENDIF
@IF
CheckFlag
who=Romans
flag=2
State=On
@THEN
ChangeTerrain
terraintype=2
maprect
11,11,11,11,11,11,11,11
Text
The Romans have failed to retake Veii. Supplies run out.
EndText
@ENDIF
@IF
CityTaken
city=Veii
attacker=Romans
defender=Anybody
@THEN
Flag
Continuous
flag=2
who=Romans
State=Off
Text
The Romans have retaken control of Veii! Supplies replenished.
EndText
@ENDIF
Even if you reset the 3 flags, one of them will always be turned on again the next turn.
@BEGINEVENTS
@DEBUG
@INITFLAG
@IF
CityTaken
city=Veii
attacker=AnyBody
defender=Romans
@THEN
Flag
Continuous
who=Romans
state=On
flag=0
@ENDIF
@IF
CityTaken
city=Veii
attacker=AnyBody
defender=Romans
@THEN
Delay
delay=3
Flag
who=Romans
state=On
flag=1
@ENDIF
@IF
CityTaken
city=Veii
attacker=Romans
defender=AnyBody
@THEN
Flag
Continuous
who=Romans
state=Off
flag=0
@ENDIF
@IF
CityTaken
city=Veii
attacker=Romans
defender=AnyBody
@THEN
ChangeTerrain
terraintype=2
exceptionmask=0b10000000000
maprect
20,20,20,20,20,20,20,20
@ENDIF
@IF
CheckFlag
who=Romans
state=On
mask=0b00000000000000000000000000000011
threshold=2
@THEN
ChangeTerrain
terraintype=0
exceptionmask=0b10000000000
maprect
20,20,20,20,20,20,20,20
@ENDIF
@ENDEVENTS
Delay = 0 or >3?It seems to sort of work, except the delay doesn't work properly.
Yeah, I'm pretty sure that's true. Perhaps because it's so late in the sequence that it might as well be next turn.but a flag takes until next turn to be set anyway, doesn't it?
Is the following the unwritten corollary? "Delay does not work with flags. Use DelayPerFlag."DelayPerFlag: This is the flag modifier, which allows you to delay the actions in an event a number of turns based on the state of selected flags. It's similar to the Delay modifier, and like Delay it belongs in the action portion of the event. BaseDelay is a constant; the actions will always be delyed by at least this number of turns...
Originally posted by Boco
Is the following the unwritten corollary? "Delay does not work with flags. Use DelayPerFlag."
So, perhaps evaluating two flags and using DelayPerFlag for one of them could work. Right?![]()
Yes, the PerFlagDelay argument for DelayPerFlag depends on flag status, but I thought the BaseDelay argument was the Delay action for flags regardless of status.DelayPerFlag isn't just the Delay action for when you're using flags