User Tag List

Results 1 to 6 of 6

Thread: Two way doors in a platformer

  1. #1
    No Products Registered

    Join Date
    May 2008
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Two way doors in a platformer

    I'm back with another question. The game I'm working on is a platformer with heavy inspiration from games like kirby, Cave Story, etc.. I'm using doors to let the player traverse between frames.

    I've figured out how to get them to work. I have it set so when the player is overlapping the door, and the player presses up up arrow, he is transferred to the next frame.

    This works for the most part, but I don't know how to get the player to appear in the right area when he moves frames. He obviously starts wherever I place his object on the frame when I make it. For example, when I go back from frame two to frame one, he appears back at the left side of the map, where he originally started.

    I need to know some way to make using the door send his object over to where I want it on the next frame, so I can have him go back and forth through doors without it being awkward like that.

  2. #2
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Two way doors in a platformer

    *User presses up
    *Overlapping door 1
    -set alterable value A to 1
    -go to level 1

    *Start of frame
    *alterable value A of Player=1
    -set position of player in front of door 1

    You'll need your player to be global, but I'm assuming it already is.

  3. #3
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Jaffob's Avatar
    Join Date
    May 2008
    Location
    USA
    Posts
    1,833
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Two way doors in a platformer

    When a door is used, set Global Value A to the X position you want the player to appear on the next frame, and same with Global Value B and the Y position. At the start of any frame, set the player's position to (Global Value A, Global Value B).

    Note: You will have to specify the two global values before starting the game, so the player will appear in the right place the first time.

  4. #4
    No Products Registered

    Join Date
    May 2008
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Two way doors in a platformer

    Alright, I haven't fooled around with Global variables yet. I'll work around with that and try to figure it out from there.

    Thanks for the help.

    Edit:

    Alright, for the most part it works. I just have a little addendum to the original question. Is there some way I can change his direction with variables as well, so I can make him facing a certain way when I go back through the door, instead of always starting out by facing right?

  5. #5
    No Products Registered

    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    1,141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Two way doors in a platformer

    You can set direction based on an expression, there is a button to do this in the direction selector.

  6. #6
    No Products Registered

    Join Date
    Apr 2008
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Two way doors in a platformer

    save the direction (that is, Dir("Hero")) to global value C, and then set his direction at the beginning of the level to Global Value C.

    Just as a future reference note, MMF saves all its directions on a 32 direction basis, so left is "16" and right is "0" regardless of how many animation frames you have.

Similar Threads

  1. Opening doors using qualifiers
    By hellii in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 24th December 2012, 11:36 PM
  2. Doors that open and close? please help
    By bastien067 in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 11th October 2011, 02:33 AM
  3. Open Doors with Keyboard
    By Captain_Harris in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 3rd August 2011, 05:28 AM
  4. keys and doors
    By willow in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 22nd November 2009, 04:40 PM
  5. One Way Doors
    By Jakinbandw in forum Vitalize
    Replies: 2
    Last Post: 23rd October 2008, 10:56 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
  •