NPC movement (npc.em)
Posted: Mon Apr 07, 2008 8:42 am
Inspired by Luth topic, i remember the things i missed in the past on NPC movement.
We all know the funny things in ai scripting when e.g. a dragon is stopped in movement by a small box or a group of some chicken or rats standing in his way. Players even use this to block npc.
You can script a complex workaround using findpath or script different cases.
I think it would be nice if the npc.em commands for movement could have two new features.
First, that an error is returned, if the npc can't move the next step cause the server denied it (blocking static, object (item or npc), multi).
At the moment you only get a 1 for a successfull move or an error if you put in a wrong param or invalid coordinates.
An error return like {"error", static}, {"error", item}, {"error", npc/char} or {"error", multi} would be great.
Second, a force movement param could be helpful (like MOVEOBJECT_FORCELOCATION). If we get an error like {"error", npc/char} where npc.npctemplate is a chicken to stay at the example above, a forced movement at the next step could be helpful.
We all know the funny things in ai scripting when e.g. a dragon is stopped in movement by a small box or a group of some chicken or rats standing in his way. Players even use this to block npc.
You can script a complex workaround using findpath or script different cases.
I think it would be nice if the npc.em commands for movement could have two new features.
First, that an error is returned, if the npc can't move the next step cause the server denied it (blocking static, object (item or npc), multi).
At the moment you only get a 1 for a successfull move or an error if you put in a wrong param or invalid coordinates.
An error return like {"error", static}, {"error", item}, {"error", npc/char} or {"error", multi} would be great.
Second, a force movement param could be helpful (like MOVEOBJECT_FORCELOCATION). If we get an error like {"error", npc/char} where npc.npctemplate is a chicken to stay at the example above, a forced movement at the next step could be helpful.