Best Way to Tick NPCs

mstultz
edited August 2010 in Photon Server
Using the example Npc/NpcItem/NpcInterestArea classes, what would be the best way to 'tick' Npcs? I used ScheduleOnInterval() on the NpcItem's fiber during testing, but I'm not sure if this is optimal. How would you guys go about updating these Npcs?

Comments

  • ScheduleOnInterval() allows you to access the npc item properties without having to worry about concurrency issues.
    I would maybe not use it if that tick is a long running transaction, then it might delay other tasks that are queued on the same fiber.