Hey, thanks for the reply again.
Since you’re here, I might as well ask about the turn event trick that FE8 uses in chapter 1 which spawns reinforcement on the first EP when an AREA event gets activated…
////// Turn Event to Load Reinforcement //////
TurnBasedEvents:
TURN 0xC label17 [1,255] 0x0
label17:
SVAL 0x2 0x8E4F014 // reinforcement location
CALL label38
EVBIT_T 0x7
ENDA
label38:
EVBIT_MODIFY 0x4
CALL label27
EVBIT_T 0x9
LOAD_SLOT1 0x1
ENUN
EVBIT_F 0x9
EVBIT_MODIFY 0x0
ENDA
label27:
EVBIT_MODIFY 0x1
EVBIT_F 0x2
CHECK_EVBIT 0x8
BEQ 0x0 0xC 0x0
FADU 16
LABEL 0x0
EVBIT_MODIFY 0x0
ENDA
////////////////////////////////////////////////////////////
////// AREA Event to Trigger Turn Event //////
MiscBasedEvents:
AREA 0xB label23 [6,0] [14,8]
label23:
SVAL 0x2 0x0
CALL label37
ENUF 0xC
EVBIT_T 0x7
ENDA
label37:
CHECK_ALLEGIANCE 0xFFFF
BEQ 0x0 0xC 0x2
CALL label25
LABEL 0x0
ENDA
label25:
CHECK_EVENTID
SADD 0xC2
ENUF_SLOT2
EVBIT_T 0x7
ENDB
This is taken from FE8 Chapter 8. Once an ally activates an AREA event, it does an “ENUF 0xC”, which re-activates the reinforcement event quoted above and spawns the reinforcements.
My question is, how does the above event know not to load reinforcement on the very first turn since the reinforcement load event runs from turn [1,255]. When I copied the above code from Chapter 8 to a different chapter and changed the reinforcement pointer as well as the event IDs, the reinforcement gets loaded as soon as turn 1. I suspect it had something to do with the event bits, which I don’t know much about.
Thanks again!