This compiles and behaves properly
LongPause := logic{GetRandomInt(0, 2) = 0};
var Delay:float = DelayBetweenRounds;
var Message:message = EndMessage(RoundCount);
if (LongPause?):
set Message = EndLongMessage(RoundCount);
set Delay = LongDelayBetweenRounds;
ShowText(Message, Agent);
Sleep(Delay);
This compiles and when it runs, the second logger function is called twice.
Logger.Print("Pause start {GetSimulationElapsedTime()}");
LongPause := logic{GetRandomInt(0, 2) = 0};
if (LongPause?):
ShowText(EndLongMessage(RoundCount), Agent);
Sleep(LongDelayBetweenRounds);
else:
ShowText(EndMessage(RoundCount), Agent);
Sleep(DelayBetweenRounds);
Logger.Print("Pause end {GetSimulationElapsedTime()}");