Users browsing this thread: 1 Guest(s)
Initial NPC States
08-08-2015, 08:51 AM
I'm sure this isn't a hard question, but does anyone know how NPC's are shown / hidden, or start their walking patterns when you first enter an area? Are the events associated with the NPC's just executed immediately? If so how are some triggered when you press the A button, just with conditionals?
An NPC has an appearance bit (1EE0-1F5F). The NPC will be visible if the bit is set. As for the walking patters, random walking and fixed position are determined by a bit in the NPC Data. There are 16 possible actions in LE but only a few are used (and coded). I can't recall what they are except the two I mentioned. For determined walking pattern (like running 4 tiles left then 4 tiles right repeatedly) it's usually a small event that loop for the NPC.
Edit: If you want to know how all that works in the code, I had no clue since I never needed to look at it.
Edit: If you want to know how all that works in the code, I had no clue since I never needed to look at it.
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)