Adding a pause to scripts
I'm trying to add a pause to an NPC script between statements while preserving the if block. So ideally, without using event_timer.
I tried using the threadmanager's wait function, but it doesn't do anything. I've referenced the example in http://wiki.eqemulator.org/p?Lua_NPC_Examples This is from the example Code:
local ThreadManager = require("thread_manager"); This is my implementation Code:
function event_say(e) |
Just a guess but punctuation kills me so
Lack of semicolon after tm:Wait(5) Dont know lua though. |
Thanks for the response Gnowm.
Lua is forgiving if you don't use semi colons :) It's actually not good because nearly every other language uses them, and after a few hours of being lazy with Lua I end up missing them when I go back to other projects. I did work this out in the end, but not with the thread manager, which is probably not fit for purpose in this case. I wound up using qglobals to store a condition, and a heartbeat timer to check for the condition and act accordingly. |
You need to use a timer
|
cheers Demonstar :)
|
PEQ quest repo has a few examples.
|
An example can also be found here on our not yet announced new documentation :)
https://eqemu.gitbook.io/quest-api/events#event_timer |
Quote:
|
I cant correctly express my gratitude. Youve basically enabled
this numbskull to learn and play. Great examples and answers both on the wiki and the forum. Kudos and thankyou all. |
All times are GMT -4. The time now is 01:43 PM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.