User Tag List

Results 1 to 6 of 6

Thread: xLua - pause execution

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    xLua - pause execution

    Sorry if this has been asked already, but is there a way to pause the script execution in xLua? I've always wanted this feature, but never asked for it anywhere. Theoretically, it must be possible, but I'm not sure if it's part of Lua or Retriever2 would have to code it, which would involve much more programming, I suppose.
    Is there a way?

  2. #2
    Clicker Multimedia Fusion 2
    Retriever2's Avatar
    Join Date
    Jun 2006
    Location
    United States
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: xLua - pause execution

    I don't think you can arbitrarily pause, say via an action, but you should look into coroutines which will let you yield out of a function, essentially pausing it at that point and letting you resume later. In fact I just recently fixed the coroutine support.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: xLua - pause execution

    Thanks, will do.

  4. #4
    Clicker Multimedia Fusion 2
    Retriever2's Avatar
    Join Date
    Jun 2006
    Location
    United States
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: xLua - pause execution

    Also, did I interpret your question correctly or were you possibly referring to a sleep function to briefly pause script execution without returning control to mmf?

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: xLua - pause execution

    No. I want something like this:

    There's a robot on the screen.

    The script is
    walk_left()
    walk_up()

    What happens: The robot walks left, say, 20 px. After that, it walks up 20 px.

  6. #6
    Clicker Multimedia Fusion 2
    Retriever2's Avatar
    Join Date
    Jun 2006
    Location
    United States
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: xLua - pause execution

    yeah coroutines will help anywhere you have a batch of commands you want to run that might need to be spread over several frame loops.

Similar Threads

  1. Replies: 10
    Last Post: 15th October 2012, 04:33 PM
  2. execution in the background...
    By Sevennemesis in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 10th October 2012, 06:00 PM
  3. Background Execution
    By payopepe in forum iOS Export Module Version 2.0
    Replies: 2
    Last Post: 24th September 2012, 08:43 PM
  4. How pause a lua script in xlua?
    By WKT in forum Lua Scripting
    Replies: 10
    Last Post: 18th March 2010, 03:30 AM
  5. EXE crashes on execution?
    By Gamerdude in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 12th July 2006, 11:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •