PDA

View Full Version : Lua + C++ Function Execute



steadi
2nd December 2012, 17:38
Hello There,

This is a slightly harder question to answer and it has me darn right confused. I am in the midst of creating a game in Qt using C++, the game's programming language is lua. Now, If I try to execute the same c++ function twice in lua, it only executes the first one... waits for it to finish then moves onto the next one like a que.

i.e - If i use the lua function move_sprite_to, it moves a sprite to the given location slowly. But, if i use this twice on two different sprites: Only one will work.

Sorry if this wasn't detailed enough as it's hard to explain. If you don't understand the problem then please don't respond,
Thanks In Advanced,
Matt

amleto
2nd December 2012, 17:44
I fail to see where your Qt question is. This is a Qt forum, after all.

What you are experiencing is totally normal and must be the case. If you want some different behaviour, then figure out how to manage multiple sprite movements simultaneously, or use threads (assuming this is safe).