[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Pausing and continueing a script
- From: Jack Christensen <jack@...>
- Date: Sun, 04 Jan 2004 15:24:17 -0600
I'm using Lua for game scripting. I'd like to have the script call a
command, pause execution until it is finished, then resume at the next
statement.
For example for an NPC:
PickupWeapon()
EquipWeapon()
MoveTo(40,40)
GuardLocation()
Obviously I don't want it equipping a weapon before it has picked it up.
From studying the documentation I think coroutines and threads are what
I should be looking into, but I wanted to ask before I head done a
possibly wrong approach.
Thanks.
-Jack