How to trigger an event when a unit is standing in a specific area?

I’m on Febuilder on an Sacred Stone rom, and I don’t know how to make a character says a quote by being in a specific area of the map. So my question is: How to trigger an event when a unit is standing in a specific area?

1 Like

Go to events and set it as a range condition event. It should be under Always Conditions.

3 Likes

In addition to what TastaPasta said, you may also consider other aspects such as whether any unit should be able to trigger the event, or just a specific unit. Here I made an example event where Gilliam is the specific unit that triggers it:


Note: The Conditional ID and Label ID can be set to any value as long as they correspond to each other. Here I chose A, B and C for the sake of clarity.

To start with, I check whether the unit is alive at all. This is because checking if a unit is active, which is done in the next step, freezes the game by default if that unit is dead. (This means that checking if they are alive is not needed for essential units, as them being dead would cause a game over.)

The way the check works is that if they are alive, “1” is returned. If not, “0” is returned. So in this instance, the event skips straight to the corresponding Label (0xA, at the bottom) if Gilliam is dead.

In this example I have assumed that temporary flag 7 activates when the event executes. This is why the flag is turned off in the event Gilliam is alive but not active when someone steps in range of the event.

You may notice that if Gilliam is active and the event triggers, then the event reaches a GOTO conditional, which bypasses the line turning flag 7 off so the event will not be triggered again.

In the event that any playable character should be able to trigger the event, skip the alive-check and replace check-whether-Gilliam-is-active with an allegiance-check.

I understand that this might be a lot to take in if you’re not familiar with programming, so feel free to ask any questions :slight_smile:

1 Like

To start with, I check whether the unit is alive at all. This is because checking if a unit is active, which is done in the next step, freezes the game by default if that unit is dead. (This means that checking if they are alive is not needed for essential units, as them being dead would cause a game over.)

While this is technically true of the base game, FEBuilder has a patch to prevent freezing when trying to check an active unit (and some other related freezes):

Moreover, all of this is further unnecessary if one wishes to restrict a range event to a particular unit in FE8, because a dedicated command exists for that (as used in Chapter 1 of the base game):

2 Likes