• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

My module walk some erros, can help simple?

chupaescadatri

Banned User
Joined
Jul 5, 2014
Messages
338
Reaction score
49
I'm creating a module that when clicking the character walks up
Code:
g_mouse.bindPress(sbw, function() g_game.walk(North) end)
The problem is that if I hold the mouse on the button it does not continue walking,
Has to be clicking several times, each click it walks 1 sqm.
I wanted to click and hold and he keeps walking, what am I doing wrong?
 
I think bindPress may only trigger when the mouse is clicked. You shall some other function or embed in a loop.
With the keyboard also use bindpress but if it holds it works, the mouse does not only work once, then it has to click again.
I do not know how to put a loop code
 
Try:
Code:
g_mouse.bindAutoPress(sbw, function() g_game.walk(North) end, 200)
200 - interval 200 ms = 'press' 5 times per second
 
Back
Top