Results 1 to 2 of 2

Thread: Lua + C++ Function Execute

  1. #1
    Join Date
    Oct 2012
    Posts
    32
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Lua + C++ Function Execute

    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

  2. #2
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Lua + C++ Function Execute

    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).
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

Similar Threads

  1. Replies: 11
    Last Post: 5th September 2012, 20:47
  2. Replies: 4
    Last Post: 2nd August 2012, 07:42
  3. Replies: 2
    Last Post: 6th December 2010, 21:36
  4. Replies: 0
    Last Post: 10th March 2010, 08:13
  5. How to Execute Qt script from Qt
    By vishal.chauhan in forum Qt Programming
    Replies: 1
    Last Post: 7th May 2007, 09:12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.