[Buildfiles] How do I create an event that changes enemy AI once a player unit steps inside an area?

post must be at least 20 characters

Put this under your MiscBasedEvents:

AREA (eid) (event name) [0,0] [0,0] // put the coordinates for the area here

Under your event name, your event should look something like this:

SVAL 0x2 0x0
CALL 0x9EE1B8 // this and sval check if the unit triggering the area is a player unit
// put whatever text you want here
SVAL 0x1 0x00040000 // sets ai to [0x0,0x0,0x4,0x0] (pursue without heed)
CHAI [8,6] // changes the ai of this coordinate
NoFade
ENDA

Of course, this example uses Tequila’s New CHAI, found here: