When your character walks into a house, enter a new frame, than leave the house, but than he enters another house, and leaves, how do you position him outside that house, in the previous frame, as opposed to being outside the house where the characters position started in the frame. UUHH... man its so hard to explain...
Character starts frame not near a house, enters house/new frame, leaves house, previous frame, how do you make him outside that house, without making a totally new frame.
Question 2: Whats the limit on "PC controller" buttons you can use in MMF2? Is there an extension, so that I can design a game with the 360 controller in mind?
An answer to Question 1: You need to set the characters X and Y positions in a Global Value. So, you'd do, for example:
1.
PLAYER COLLIDES WITH HOUSE + SHIFT IS PRESSED:
Set Global Value A to X(Player)
Set Global Value B to Y(Player)
2.
Then, when you re-enter the frame:
START OF FRAME + GLOBAL VALUE A >0 + GLOBAL VALUE B >0
Set X Position of Player to Global Value A
Set Y Position of Player to Global Value B
That's the way I would do it. You might need to amend the Global Values depending on whereabouts the door of the house is, in the 2nd group of events, so that you don't actually overlap a house. Maybe, for example, you could modify the event so that the player is positioned just in front of the house:
2.
Then, when you re-enter the frame:
START OF FRAME + GLOBAL VALUE A >0 + GLOBAL VALUE B >0
Set X Position of Player to Global Value A
Set Y Position of Player to Global Value B + 32 (shifts the player 32 pixels down)
wait, what? Default? How would that help me with positioning after the frame started, when left from previous frame(house), when the character wasn't originally positioned there. I feel like I have been making frames, and character positions wrong...
Rather than using global values, you can use alterable values of the player object and set the "global" flag in the object preferences.
There's nothing wrong with using global values of course, but I prefer to save them for variables central to the game rather than wasting them on little things like this.
I use two of MMF's global values for the player's X and Y position firstly.
Then all you have to do is when the player collides with invisible active pictures (what I use) that mark an exit of a level, or a doorway, you just change the X and Y starting values for the next frame and then jump to said frame.
And don't forget to always set your player's X and Y values to those global values and you'll be golden!
--
"Del Duio has received 0 trophies. Click here to see them all."
"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"
DXF Games, coming next: Hasslevania 2- This Space for Rent!