lua-users home
lua-l archive

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


hello ppl,
i am working on a 3D game engine and i wanted to add scripting support to it. i have chosen LUA as the scripting language and have done some basic work.( still i am a comlepte noob in terms of LUA .....)
wat i basically want to do is like this :
for example a patrol script .... that wud enable an NPC to patrol between waypoint 5 and 6.

MOVE(WP5)
IDLE()
MOVE(WP6)
IDLE()
i know the basics like exporting functions to LUA and stuff the problem that i am facing is that for that above script to work i need to stop further execution of the script once the move function is called ...... and resume execution (once the bot has moved to the given location .... ) from the next statement i.e. IDLE()
well one of the reasons that i want this to happen this way is that the script is called(executed) at every frame to determine the bots behaviour.
anybody has any ideas on this one ..... is there sumthin that i am doing wrong???
urgent help is needed.
sorry for my poor english but i hope that i have expressed myself clearly .... any help will be greatly appreciated.
sohyl.


Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.