Users browsing this thread: 1 Guest(s)
Initial NPC States

#1
Posts: 48
Threads: 10
Thanks Received: 3
Thanks Given: 4
Joined: May 2015
Reputation: 2
Status
None
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?
  Find
Quote  

#2
Posts: 3,971
Threads: 279
Thanks Received: 237
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
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.
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite