lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


It sounds like you'd be most interested in coroutines in Lua 5.0. They'll
allow a thread to put itself to sleep during execution, returning control
back to C++. Then, you can just wake it up again when a mouse click comes
in.

Ben

On Thu, 27 Feb 2003, teranwong <teranwong@yahoo.com> wrote:

> Dear All,
>
> I am new to Lua and also game industry... now I am writing a
> scripting server... and stuck in some area... hope some of you can
> give me some idea ^^
>
> when running a script in an Online game and waiting for a mouse click
> from user in order to run the next line... I think I should not keep
> waiting for the mouse click packet since there are many packets
> arrive... and so I want to pass out a pointer or a reference so that
> when I get the mouse click packet in next game loop, I can process
> the rest of the script... sounds like make sence... but how to do it
> with Lua and C++?? is the 5.14 Reference to Lua Objects from the
> manual is a way to solve this? pls give me advice ^^ thxthx
>
>