Updating task during timer tick
I am getting stuck on the very end of this task. Basically an ooze spawns from a different script, grows in size and then is supposed to despawn. After the despawn I need to manually update the task. If you look in my script I also have a death event. If I manually kill the ooze then the task does indeed update. How come I cannot update from the timer event ? Everything works except the task never updates unless I kill the ooze myself.
Code:
## Provocating - Dragons of Mist |
first thing that comes to mind is there is not active $client information in the EVENT_TIMER sub routine. How would the quest function know which client to update?
|
Sorvani is exactly right. Since the timer event itself is triggered by a timer and not by a client, there is no way for it to know which client to update. Your best bet is probably to have the NPC send a signal to player.pl and then update your task from there for anyone that has it.
Basically, you would remove the line that updates the task activity and insteal put the line below: Code:
$npc->SignalAllClients(1); player.pl Code:
sub EVENT_SIGNAL { |
Nothing seems to be working past the line that is now changed to...
Code:
$npc->SignalAllClients(1); Here is what I have, if I leave it like this the mob never despawns. If I remark the new line out, he does despawn. Code:
## Provocating - Dragons of Mist |
Should be $entity_list->SignalAllClients(1) from what I can tell.
|
Woo hoo ! Worked like a champ, and I learned something new !
|
All times are GMT -4. The time now is 08:46 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.