User Tag List

Results 1 to 3 of 3

Thread: XLua MMFI help

  1. #1
    No Products Registered

    Join Date
    Apr 2009
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    XLua MMFI help

    I'm messing around with the ext_mmfi file that comes with the XLua examples and I am having some trouble. If you're going to look through this and test out what I'm doing please be aware that XLua doesn't currently handle collisions correctly with HWA and you'll have to open up the example in normal MMF2 for it to work.

    Currently the demons are set up like this in the embedded lua script:
    • demonClass.common.x_vel = 1
    • demonClass.common.y_vel = 0
    • demonClass.common.x_accel = 0
    • demonClass.common.y_accel = 1

    Which works just fine, but I'm trying to get the variables to be set based on alterable values A,B,C and D. So I put:
    • demonClass.common.x_vel = self.values[mmf.ALT_A]
    • demonClass.common.y_vel = self.values[mmf.ALT_B]
    • demonClass.common.x_accel = self.values[mmf.ALT_C]
    • demonClass.common.y_accel = self.values[mmf.ALT_D]

    When I do that I get the debugger error of "[string "Demon AI"]:87: attempt to call method 'step' (a nil value)" so apparently I'm trying to access them wrong.

    What is the correct way to do this? I've looked at the documentation on values and it looks like what I'm doing should work.

    Thanks for your help in advance!

  2. #2
    No Products Registered

    Join Date
    Apr 2009
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: XLua MMFI help

    Err, just figured it out myself.

    I had to do this inside of the step() function for it to work.

  3. #3
    Clicker Fusion 2.5
    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)
    JimJam's Avatar
    Join Date
    Jun 2006
    Location
    USA
    Posts
    338
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: XLua MMFI help

    Well, this is good. At least you solved your own problem. And its good that you posted an answer to your problem too. People should always post solutions. It helps anyone who might find themselves in the same situation.

Similar Threads

  1. Qualifiers with new MMFI?
    By SolarB in forum Lua Scripting
    Replies: 2
    Last Post: 23rd July 2012, 05:04 PM
  2. xlua mmfi...
    By Zode in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 28th November 2011, 02:00 PM
  3. Xlua : Problem with MMFI
    By donmanolo in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 29th August 2011, 06:17 AM
  4. Setting Up MMFI
    By astrospoon in forum Lua Scripting
    Replies: 2
    Last Post: 26th May 2010, 01:06 AM

Posting Permissions

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