Unit Triggering Enemy Spawns

I’m trying to hack FE7 and it’s going fine.Except I’m having issues trying to find a way to spawn an enemy when an ALLY steps on a certain tile. I probably am just missing something really simple but I can’t get it. I just need a little explanation and maybe an example would help.

Area event, check if it’s player phase during the event. If true, load the reinforcements. If not, do nothing. Look at Archs eventing guide for area events and conditionals.

This is what I have. I don’t know what’s wrong

Misc_events:
AREA 0x3D Punishment [10,20] [12,20]
END_MAIN

Punishment:
IFAT 0x01 0x7A2F1
LOU1 Soniaa
ELSE 0x02
ENIF 0x01
ENIF 0x02

Soniaa:
UNIT 0x5B 0x23 0x00 Level(15,Enemy,True) [16,20] [15,20] [Bolting, Elfire] [0]
UNIT

In the else block you should reset the event ID so that the event can keep firing until it’s triggered in the correct phase.

Also, LOU1 commands should always have an ENUN on the next line.

How exactly do I make it reset?

ENUF 0xWhateverIdIsAttachedToTheEvent

It still isn’t working. Can you give me an example? Archs was too confusing considering I thought I had it right.

you didn’t put an END_MAIN at the end, also, did you put in the ENUN as was instructed?

Looking at this again, the routine you’re calling checks if it’s the enemy’s phase, instead of the ally’s. So, let’s rework this a little bit.

Misc_events:
AREA 0x10 Punishment [10,20] [12,20] // You used 0x3D before, but I've got a feeling that's too large a number.
END_MAIN
////////////
Punishment:
IFAT 0x01 0x7A2F1
  // If we're in here, that means it's the enemy phase.
  // We need to reset the event so that when a player unit eventually gets here, the event will trigger
  ENUF 0x10
ELSE 0x02
ENIF 0x01
  // If we're in here, it should be the player phase.
  LOU1 Soniaa
  ENUN
ENIF 0x02
ENDA
///////////
Soniaa:
UNIT 0x5B 0x23 0x00 Level(15,Enemy,True) [16,20] [15,20] [Bolting, Elfire] [0]
UNIT
1 Like

Thank you so much. I don’t learn very much unless it’s shown to me. It worked and now the trap works perfectly.