NPC onTick Function

Post Reply
DeVeous
Posts: 40
Joined: Sun Jul 22, 2012 8:11 pm

NPC onTick Function

Post by DeVeous » Thu Aug 23, 2012 2:32 pm

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.

Kyousousha
Posts: 15
Joined: Sat Aug 04, 2012 12:55 am

Re: NPC onTick Function

Post by Kyousousha » Thu Aug 30, 2012 11:39 am

Can you give an example of where this would be needed?

DeVeous
Posts: 40
Joined: Sun Jul 22, 2012 8:11 pm

Re: NPC onTick Function

Post by DeVeous » Thu Aug 30, 2012 3:17 pm

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).

xipies
Posts: 119
Joined: Thu Aug 02, 2012 11:29 pm

Re: NPC onTick Function

Post by xipies » Mon Sep 03, 2012 9:35 pm

Would this be for things like when Vhana Ehgaklywha lights the streetlamps?

User avatar
diatanato
Developer
Posts: 112
Joined: Thu Aug 30, 2012 9:59 pm

Re: NPC onTick Function

Post by diatanato » Mon Sep 03, 2012 10:03 pm

I am sorry, but it is bad idea. too much processor time for the sake of 1-2 npcs will be lost

PrBlahBlahtson
Developer
Posts: 539
Joined: Sun Jul 22, 2012 12:17 am

Re: NPC onTick Function

Post by PrBlahBlahtson » Mon Sep 03, 2012 11:22 pm

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.

User avatar
diatanato
Developer
Posts: 112
Joined: Thu Aug 30, 2012 9:59 pm

Re: NPC onTick Function

Post by diatanato » Tue Sep 04, 2012 12:33 am

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 ^^

Post Reply