Help with a hack

I’m making a rom hack and I’m trying to make it so that there’s these three villages and if all of them are destroyed, you get a game over, I think what a need to use is counters but I’m not sure I’m doing it right, does anyone know how I’d do this? I’m using FEBuilder GBA btw.

Have each village set a flag (eg. 0x8, 0x9, 0xA) when destroyed and then have an always event that checks if these flags are set, and if so, to set flag 0x65 game over.

Eg.

CHECK_EVENTID 0x8
BEQ 0 sC s0 
CHECK_EVENTID 0x9
BEQ 0 sC s0 
CHECK_EVENTID 0xA
BEQ 0 sC s0 
ENUT 0x65
LABEL 0
EVBIT_T 7
ENDA

I think there’s a patch to tie tile changes to set flags, so that might be the easiest way.

You would need to set a flag in the event each village is destroyed, and then you’ll need to make a always condition to check if all the flags for destroyed villages are set, then a game over is triggered.

1 Like