Announcement

Collapse
No announcement yet.

When are flags checked

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • When are flags checked

    If I use a FLAG action in my events file to set a flag when is an event that has a CHECKFLAG trigger on that flag going to be triggered. As far as I can see they occur during the A.I.'s turn. Why is this?

    eg

    @IF
    UNITKILLED
    unit=settler
    attacker=Russians
    defender=English
    @THEN
    FLAG
    continuous
    who=Russians
    state=On
    flag=0
    @ENDIF

    @IF
    CHECKFLAG
    who=Russians
    flag=0
    state=On
    @THEN
    JUSTONCE
    TEXT
    The Russians sink to murdering innocent civilians!
    ENDTEXT
    @ENDIF

    The text of the second event does not appear until the A.I's turn. Why is the second event not triggered as soon as the flag is set. Can anyone please explain what the exact logic and timing is in all these events.

    Thanks in advance,
    Adrian

  • #2
    Checkflag statements that are not connected to other trigger events, such as unitkilled, seem to be resolved at the end of the turn. End of the turn being after all civs have moved.

    Comment

    Working...
    X