Skip to content

Npc Modes

Jordan edited this page Oct 25, 2023 · 1 revision

Npcs operate in the game based on their current set mode. Npc modes are processed every game tick if currently set. The following are the available modes that can be set on an npc depending on the interaction being developed.

Name Description Example Pointers
null The default mode of the npc as set by its config. npc_setmode(null);
none The npc literally does nothing. Useful for dying for example. npc_setmode(none);
wander The npc randomly wanders around their starting coord. npc_setmode(wander);
patrol Patrol walk between a list of coords. npc_setmode(patrol);
playerescape Retreat from its target. Walks back to its starting coord and sets mode to null automatically. npc_setmode(playerescape);
playerfollow Follow its target. Useful for pets for example. npc_setmode(playerfollow);
playerface Face its target while within maxrange distance set by its config. npc_setmode(playerface);
playerfaceclose Face its target while within within 1 tile distance. Useful for when chatting to an npc. npc_setmode(playerfaceclose);
opplayer1-5 Ai mode [ai_opplayer1-5,_] script. Operable interaction. npc_setmode(opplayer5); Npc, Player
applayer1-5 Ai mode [ai_applayer1-5,_] script. Approachable interaction. npc_setmode(applayer2); Npc, Player
oploc1-5 Ai mode [ai_oploc1-5,_] script. Operable interaction. npc_setmode(oploc3); Npc, Loc
aploc1-5 Ai mode [ai_aploc1-5,_] script. Approachable interaction. npc_setmode(aploc1); Npc, Loc
opobj1-5 Ai mode [ai_opobj1-5,_] script. Operable interaction. npc_setmode(opobj3); Npc, Obj
apobj1-5 Ai mode [ai_apobj1-5,_] script. Approachable interaction. npc_setmode(apobj1); Npc, Obj
opnpc1-5 Ai mode [ai_opnpc1-5,_] script. Operable interaction. npc_setmode(opnpc4); Npc, Npc2
apnpc1-5 Ai mode [ai_apnpc1-5,_] script. Approachable interaction. npc_setmode(apnpc2); Npc, Npc2