The Daily Click ::. Forums ::. Klik Coding Help ::. I have a few questions about frame jumping
 

Post Reply  Post Oekaki 
 

Posted By Message

JetpackLover



Registered
  01/03/2007
Points
  212
5th March, 2007 at 16:00:28 -

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?

umm...thats all ^^

 
http://www.invincibletime.com/

Devlog for HD MMF Game Omulus. Check it out because it's gonna be awesome. http://omulus.tumblr.com/

Follow me on the twitters https://twitter.com/JetpackLover


The Chris Street

Administrator
Unspeakably Lazy Admin

Registered
  14/05/2002
Points
  48487

Game of the Week WinnerClickzine StaffAcoders MemberKlikCast StarVIP MemberPicture Me This Round 35 Winner!Second GOTW AwardYou've Been Circy'd!Picture Me This Round 38 Winner!GOTM December Third Place!!
I am an April FoolKliktober Special Award Tag
5th March, 2007 at 16:29:03 -

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)

 
n/a

JetpackLover



Registered
  01/03/2007
Points
  212
5th March, 2007 at 16:34:29 -

Is that the only way I could do it?

 
http://www.invincibletime.com/

Devlog for HD MMF Game Omulus. Check it out because it's gonna be awesome. http://omulus.tumblr.com/

Follow me on the twitters https://twitter.com/JetpackLover


Peblo

Custom ratings must be 50 characters or less

Registered
  05/07/2002
Points
  185

Game of the Week WinnerVIP MemberI'm on a Boat360 OwnerAttention GetterThe Cake is a LieCardboard BoxHero of TimePS3 OwnerIt's-a me, Mario!
I'm a Storm TrooperSonic SpeedStrawberryI like Aliens!Wii OwnerMushroomGhostbuster!
5th March, 2007 at 16:37:10 -

No you can use the default movement.

 
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath

JetpackLover



Registered
  01/03/2007
Points
  212
5th March, 2007 at 16:41:35 -

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...

 
http://www.invincibletime.com/

Devlog for HD MMF Game Omulus. Check it out because it's gonna be awesome. http://omulus.tumblr.com/

Follow me on the twitters https://twitter.com/JetpackLover


Peblo

Custom ratings must be 50 characters or less

Registered
  05/07/2002
Points
  185

Game of the Week WinnerVIP MemberI'm on a Boat360 OwnerAttention GetterThe Cake is a LieCardboard BoxHero of TimePS3 OwnerIt's-a me, Mario!
I'm a Storm TrooperSonic SpeedStrawberryI like Aliens!Wii OwnerMushroomGhostbuster!
5th March, 2007 at 16:44:38 -

I was actually in the middle of editing. Here it is.

Edit: If that method is really all that difficult you could try this. You have 2 frames, a field frame and a house frame.

Field frame-
+Start of Frame
+Global Value A = 1
*Position player in front of house

House frame-
+(When you exit the house)
*Set Global Value A to 1
*Jump to Frame (field)

Image Edited by the Author.

 
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath

JetpackLover



Registered
  01/03/2007
Points
  212
5th March, 2007 at 17:02:09 -

Oooo, so global values, are what I should be doing, COOL thanks everyone!!

 
http://www.invincibletime.com/

Devlog for HD MMF Game Omulus. Check it out because it's gonna be awesome. http://omulus.tumblr.com/

Follow me on the twitters https://twitter.com/JetpackLover


Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
5th March, 2007 at 18:03:32 -

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.

 
n/a

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
7th March, 2007 at 18:22:18 -

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!
   

Post Reply



 



Advertisement

Worth A Click