User Tag List

Page 35 of 43 FirstFirst ... 25 33 34 35 36 37 ... LastLast
Results 341 to 350 of 426

Thread: XLua extention beta

  1. #341
    No Products Registered

    Join Date
    Aug 2006
    Posts
    984
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: XLua extention beta

    you do have to be somewhat careful about which of those you use because 'require' runs its code in a separate environment and iirc the load* and do* functions don't

  2. #342
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleMac Export Module

    Join Date
    Sep 2006
    Location
    UK
    Posts
    843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: XLua extention beta

    Im getting my self a bit confused with the functions within the extension?

    When i call the "on Function" event, is that only looking for function that are called from within mmf event editor?

    For instance, can i call a function at runtime from inside a script and have mmf detect it its been called, without it being called from within the event editor?

    Thanks
    Andy

  3. #343
    No Products Registered

    Join Date
    Jun 2006
    Posts
    625
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: XLua extention beta

    you can call MMF functions inside your scripts if you register those functions in MMF (action MMF Function>Register or something like that). Those functions can also return values to be used in your scripts

    I think there also is an auto-register MMF function property, but I've never used it.

  4. #344
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleMac Export Module

    Join Date
    Sep 2006
    Location
    UK
    Posts
    843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: XLua extention beta

    Hmm thanks for you reply, im still not sure if that answers, i thought it might have done but still not having an effect.

    Ill explain a quick scinario.

    I have a script loaded at runtime, nothing big.

    Theres a function i have called closeapp.

    I call that closeapp from WITHIN the script, not MMF.

    And then i want mmf to pick up that its been called and close the app.

    Thanks
    Andy

  5. #345
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    UrbanMonk's Avatar
    Join Date
    May 2008
    Location
    Southern U.S.A.
    Posts
    847
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: XLua extention beta

    Inside your function "closeapp" do this

    function closeapp()
    DoCall("closeapp")
    end

    Then in mmf under the lua functions menu, select "on function" closeapp, then add your actions under that.

    EDIT: Capitalization is important make sure it's capitalized like that: "DoCall"

  6. #346
    No Products Registered

    Join Date
    Jun 2006
    Posts
    625
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: XLua extention beta

    I never use DoCall(), so this is how I would have done it :
    I would not put closeApp() function inside the script
    I'd register it in MMF, create an 'On Function' event with close frame.

    then you can call closeApp() from inside your scripts.

    EDIT : from what you said you probably just have to remove the function declaration from your script and register it in MMF

  7. #347
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleMac Export Module

    Join Date
    Sep 2006
    Location
    UK
    Posts
    843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: XLua extention beta

    Hm this is strange, i cannot get your way to work Corentin?

    I am registering the functions befor ei run the script? IS that ok?

    So ive removed the function decleration from the script so its now only registered within MMF.

    I then have a on function event "closeapp" and that to clo the app. But it doesnt close it when i call the function within the script?

    Andy

  8. #348
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleMac Export Module

    Join Date
    Sep 2006
    Location
    UK
    Posts
    843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: XLua extention beta

    Sorry, my bad! working now!

    Thanks
    Andy

  9. #349
    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 extention beta

    XLua could probably benefit from more examples in the distribution.

  10. #350
    No Products Registered

    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: XLua extention beta

    Personally I just use DoCall in my lua scripts as I find it easier to differenciate between MMf functions and lua functions.
    But, I always put them in a wrapper function so make it easier to keep track.

    So Instead of DoCall("closeApp") being used multiple times through my app, I would put that in a LUA function:

    function CloseApp
    DoCall("closeApp")
    end

    then if its called many times throughout my script its easier to keep track of. Personal preference though.

Page 35 of 43 FirstFirst ... 25 33 34 35 36 37 ... LastLast

Similar Threads

  1. XLua
    By Retriever2 in forum Released Extensions
    Replies: 6
    Last Post: 13th August 2017, 08:42 PM
  2. Extention error with exe
    By Jinxtengu in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 15th October 2012, 04:47 AM
  3. SPC extention question
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 20th November 2009, 04:25 PM
  4. Lua+ or xLua?
    By Shawn in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 17th October 2009, 11:55 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
  •