Page 1 of 1

NPC onTick Function

Posted: Thu Aug 23, 2012 2:32 pm
by DeVeous
What would be the overhead on adding something like an onTick function to NPCs be. Where each interval the core checked to see if the NPC's lua had an onTick function, and performed whatever was in the script. Changing animation or whatever.

Re: NPC onTick Function

Posted: Thu Aug 30, 2012 11:39 am
by Kyousousha
Can you give an example of where this would be needed?

Re: NPC onTick Function

Posted: Thu Aug 30, 2012 3:17 pm
by DeVeous
NPCs that should appear to be in different stages of a task, such as fishing, crafting (so switch their animation occasionally). NPCs that have a routine path they walk along. (move them along to point B, wait, then start back towards point A).

Re: NPC onTick Function

Posted: Mon Sep 03, 2012 9:35 pm
by xipies
Would this be for things like when Vhana Ehgaklywha lights the streetlamps?

Re: NPC onTick Function

Posted: Mon Sep 03, 2012 10:03 pm
by diatanato
I am sorry, but it is bad idea. too much processor time for the sake of 1-2 npcs will be lost

Re: NPC onTick Function

Posted: Mon Sep 03, 2012 11:22 pm
by PrBlahBlahtson
NPC movements can't really be approached until DesertWorld is finished, really. Otherwise, you have NPCs walking through walls.

The npc_list table has an animation and subanimation field. I have no idea if they actually do anything now, but that would probably handle non-walking NPCs for a start, once it's implemented.

Re: NPC onTick Function

Posted: Tue Sep 04, 2012 12:33 am
by diatanato
PrBlahBlahtson wrote: The npc_list table has an animation and subanimation field. I have no idea if they actually do anything now
dont worry, it do what must do ^^