Thanks for this!
Nivram's Examples -Need extensions? Send me a PM.-
Wow you update this thing fast... I might have to convert now
thats some mighty support you manage
Thanks for all the comments.
I wanted to mention that every so often I add one or two things to MMF Interface, but I usually don't mention them here. If you thumb through the documentation on a new release, you might find new functions listed. I always keep that up to date.
i believe you're understating the importance of the mmfi functions you just added >
I've added some properties and some items to the debugger to flesh out the object a bit. The properties will let you store a script or automatically bind a state.
Note the new URL for the moment, in case I broke something with the updated editdata structure and you need to go run and fetch the older version.
The only new functionality per se is new control over when the on error / on print events get executed.
So I have come across something strange that involves the Lua object, though I am not sure it is at fault.
In my program, I use the following code to check for collisions:
In MMF2, the function "checkCollision" looks like this:--MOVE MASK AND CHECK
mmf.Object.SetX(self.mask, self.x + xINC)
local colcheck = 0
local colObj = 0
colcheck, colObj = DoCall("checkCollision", self.mask)
So if the fixed value of a group "Mask" object is overlapping one of those things (backdrop, obstacle, or push block) it will return a number to Lua (1, 2, or 3) to let it know what it is colliding with. If it isn't hitting anything, it returns 0. (colcheck) It also returns the Fixed ID of the object it is colliding with, provided that one exists. (colObj)
The strange part is that I have 2 types of objects currently that check for collisions currently: push blocks and the player. They are both of group "Mask"
The push blocks work perfectly, but the player mask will not work with the above code. It always returns "nil" - meaning none of the events are triggering.
HOWEVER!!! If I copy all of 4 of the "Mask" events in MMF2, and replace group "Mask" with the actual player mask object, everything works correctly:
This is not really ideal however, since every new object would need copied events to function - the entire point of groups in the first place! Also, there is no logical reason why MMF would treat the above code differently if that same object is also in group "Mask"
Does anyone have any idea why one object would work with group events (my push blocks) while another object that shares the same group would not (my player object)? When I print out the value of the parameters and the fixed IDs, everything seems to match up in both cases - where is the difference coming from?
UPDATE: If the push blocks are removed from the "Mask" group in MMF2, then the player object will work correctly. (As it is now the only "Mask" group object) In other words: only one "type" of object seems to function with the group events, and the others ignore them.
UPDATE #2: It seems to stem from using groups with the "Fixed Value" conditions...Events without that work correctly.
Could you isolate this into an MFA and give it to me to look at?
Yeah, I could make my own, but often there are subtle differences in implementation that make all the difference.