Page 1 of 1

FaceTarget returns to original heading

Posted: Sun Aug 03, 2008 1:23 pm
by John Adams
I am pretty sure that NPCs who face you when hailed eventually turn back to their original heading after a time. This is a request to implement that, or discuss why it is not so important. ;)
Maybe we fire off a timer after the Hail, capture the old heading, then perform FaceTarget(), then after the timer expires, turn back?

Posted: Sun Aug 03, 2008 1:36 pm
by Zcoretri
Yeah, was noticing that yesterday.
I have also noticed that NPC's might do some different animation after talking to them. So maybe provisions in the lua spawnscripts for changing the visual_state?

Posted: Sun Aug 03, 2008 1:49 pm
by John Adams
I am waiting for the right moment to ask what the table spawn_script_data is for. ;) If this is similar to spell_data, maybe we can feed params to LUA and use them that way.

Posted: Sun Aug 03, 2008 2:12 pm
by LethalEncounter
It is not currently used. It was originally conceived to do something similar to that of the spell_data table, but upon implementation I never found any use for it.

Posted: Tue Aug 05, 2008 3:38 pm
by LethalEncounter
Added.

Posted: Tue Aug 05, 2008 3:41 pm
by LethalEncounter
Added. I also added a AddTimer function for spawn scripts so you can do whatever you want after a short period of time:
AddTimer(NPC, Time in Millis, Function, Max number of calls (optional - defaults to 1), Spawn (optional))
Ex: AddTimer(NPC, 5000, "TimerCalled", 3, Spawn) - That will call the TimerCalled function 3 times after a delay of 5 seconds each time.