lua-users home
lua-l archive

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


Hi,

We're new to scripting and are strongly considering using LUA with one
of our upcoming projects. Since our knowledge of scripting in general
is rather limited, we were wondering if someone might be able to offer
us some assistance with the following problem.

If we are wanting to implement simple script functionality such as...

----------------------------
Spawn("Location 1")

do
  GotoLocation("Location 2")
  Wait(2)
  GotoLocation("Location 1")
  Wait(2)
end
----------------------------

...whereby multiple actors can be using a script similar to (but much
more complex than) this example. The actors need to process each line
of the script sequentially, and not continue to the next line of script
until the current line (command) has been successfully completed (obviously
=p)

What would be the best way to have the script operate in this fashion
(while at the same time trying to avoid multi-threading, and
coroutines) ???

I know this kind of problem has probably been addressed at some point
in the past, but we would be extremely appreciative if someone working
with games could throw us a hint or two, or throw us some examples
relating to this issue.

Best Regards,
Daniel.

dkrenn@bigpond.com