techumseh
Deity
I'm stumped. I'm trying to make the human (German) player research a tech that allows the invasion to actually take place, but requires the capture of at least one British city within 4 turns, or the game is lost. Here is the events sequence. The delay text plays, but the game doesn't end. The EndGame event does work in a test, but not in this event. I'm out of ideas on how to fix it. Can anyone help?
;Invasion failure
@IF
ReceivedTechnology
receiver=Germans
technology=60
@THEN
JustOnce
Flag
Who=British
state=on
flag=17
continuous
TEXT
OKW has given the command to begin
Operation Seelowe. Field Marshall
von Runstedt, you have 5 turns to
capture at least one British city.
Failure to do so will result in the
cancellation of the operation.
ENDTEXT
@ENDIF
@IF
CityTaken
city=AnyCity
attacker=Germans
defender=British
@THEN
JustOnce
FLAG
flag=17
Who=British
state=off
continuous
@ENDIF
@IF
ReceivedTechnology
receiver=Germans
technology=60
@THEN
Delay
delay=4
GiveTechnology
technology=11
receiver=Germans
TEXT
Delay works.
ENDTEXT
@ENDIF
@IF
ReceivedTechnology
receiver=Germans
technology=11
@And
CheckFlag
who=British
flag=17
state=On
@THEN
EndGame
endscreens=No
TEXT
Field Marshall von Runstedt, the Fuhrer has determined that
Operation Seelowe has failed. All units are to be immediately
withdrawn. You are recalled to Berlin in disgrace. The game
is over.
ENDTEXT
@ENDIF
;Invasion failure
@IF
ReceivedTechnology
receiver=Germans
technology=60
@THEN
JustOnce
Flag
Who=British
state=on
flag=17
continuous
TEXT
OKW has given the command to begin
Operation Seelowe. Field Marshall
von Runstedt, you have 5 turns to
capture at least one British city.
Failure to do so will result in the
cancellation of the operation.
ENDTEXT
@ENDIF
@IF
CityTaken
city=AnyCity
attacker=Germans
defender=British
@THEN
JustOnce
FLAG
flag=17
Who=British
state=off
continuous
@ENDIF
@IF
ReceivedTechnology
receiver=Germans
technology=60
@THEN
Delay
delay=4
GiveTechnology
technology=11
receiver=Germans
TEXT
Delay works.
ENDTEXT
@ENDIF
@IF
ReceivedTechnology
receiver=Germans
technology=11
@And
CheckFlag
who=British
flag=17
state=On
@THEN
EndGame
endscreens=No
TEXT
Field Marshall von Runstedt, the Fuhrer has determined that
Operation Seelowe has failed. All units are to be immediately
withdrawn. You are recalled to Berlin in disgrace. The game
is over.
ENDTEXT
@ENDIF