|
You can interupt move() by setting their x/y such as:
function onWa****() {
this.x = this.x;
this.y = this.y;
}
Serverside is pretty much mandatory, so to compensate I designed the ganis to have a larger "range" so I could setshape the baddies to a larger size, thus improving the compensation for delay with hit detection. I also implemented clientside hit detection that doesn't rely on triggeractions, but instead a buffer DBNPC that handles that data communication. I found none of the cache methods that move() offers useful. Eventually the positions will become different for players and will see the npc in different places. However could possibly use some clientside extrapolation to smoothen out the movement. As far as serverside AI goes, with scheduleEvent() you can now create more than just a timeout loop. So you can let the .1 timeout handle movement and set a slower loop to handle complex AI such as picking targets, pathfinding and so on.
Also Stefan suggested not using onMovementFinished and instead set a timeout for the same movement time and using that instead.
I started the graphics for remaking the old style baddies but never finished. Could be cool.
|
Aside from setshape on NPCs with ganis being a major issue I encountered (among many) while attempting to develop baddies, I wonder whether the blocking NPC issue was also eventually resolved? (
http://forums.graalonline.com/forums...t-65444.html)?