PDA

View Full Version : quest::pause(60) - performing as expected?


noudess
07-29-2014, 02:43 PM
Guys,

I have an NP on a grid. In EVENT_WAYPOINT_ARRIVE I have a quest::pause(60), which if I understand the documentation I can find, is supposed to suspend pathing for 60 seconds.

He reaches the wp I am checking for , and pauses forever. If I look at the code, it sets the timer to 60, but also sets a flag that says "distracted from grid". When the timer fires, it clears this flag but doesn;t reset any timer, and hence, leaves the mob immobile.

I could "fix" this, but I see tons of quests coded to use pause with a value. Many, many of them also code their own resume(), I am guessing because the pause timer didn't work. Others, seem to use pause differently, in ways I do not understand.

I am very hesitant to change the behavious as I dont want to break a ton of things.

Is quest::pause(60) supposed to pause the npc on his grid for 60 and resume, or pause him forever? It looks like pause(0) is the forever option.

Splose
07-29-2014, 10:57 PM
I was using it like this and it's working as explained for me.


sub EVENT_SAY {
if($text =~/hail/i) {
quest::pause(10);
quest::say("I seem to have lost my wedding ring, have you seen it?");
}
}

noudess
07-30-2014, 09:30 AM
I was using it like this and it's working as explained for me.


sub EVENT_SAY {
if($text =~/hail/i) {
quest::pause(10);
quest::say("I seem to have lost my wedding ring, have you seen it?");
}
}

Meaning what, the NPC stopped walking? They stop walking when hailed by default. The pause happened before the say?

I have an NPC on a grid. When he reaches a specific (dynamically determined) waypoint I use pause(60) to implement a pl generated pause. He stays there forever.