User Tag List

Results 1 to 8 of 8

Thread: Air Control

  1. #1
    No Products Registered

    Join Date
    Nov 2012
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Air Control

    Hello!

    I am new to MMF2, and have a question about air control with a custom movement. I followed this tutorial to make a custom movement for a platform game, but I would like to make it so that the player can not change directions or control itself in mid-air. Basically, once you press jump, you can't control your character until you hit the ground again. I have been trying to do this for a while, but I just can't get it to work. Attached is the .mfa of the platform movement.

    Thanks,
    Sp33d
    Attached files Attached files

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleMac Export ModuleInstall Creator Pro
    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)
    Tisnart's Avatar
    Join Date
    Feb 2008
    Location
    On, Canada
    Posts
    1,031
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Try and Add *Collider is overlapping a backdrop to Line 14

    *Horiz of (Player) <> 0
    *Colider is overlapping a backdrop
    -Start loop "Horiz" Abs(Horiz( "Player" ))

  3. #3
    No Products Registered

    Join Date
    Nov 2012
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by gerald999 View Post
    Try and Add *Collider is overlapping a backdrop to Line 14

    *Horiz of (Player) <> 0
    *Colider is overlapping a backdrop
    -Start loop "Horiz" Abs(Horiz( "Player" ))

    Thanks for the tip, Gerald! Very helpful. Can I make it so that the player keeps his momentum if he's moving before he jumps, instead of just stopping dead when you press jump?

    Thanks for the help,
    Sp33d

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleMac Export ModuleInstall Creator Pro
    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)
    Tisnart's Avatar
    Join Date
    Feb 2008
    Location
    On, Canada
    Posts
    1,031
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Sp33d View Post
    . Can I make it so that the player keeps his momentum if he's moving before he jumps, instead of just stopping dead when you press jump?
    That is trickier to do but first can you tell me why you want to do this :
    Quote Originally Posted by Sp33d View Post
    I would like to make it so that the player can not change directions or control itself in mid-air. Basically, once you press jump, you can't control your character until you hit the ground again.
    Is this something that will happen only once due to a certain result like being stunned or getting hurt, etc or is this just what happens all the time?

  5. #5
    No Products Registered

    Join Date
    Nov 2012
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by gerald999 View Post
    Is this something that will happen only once due to a certain result like being stunned or getting hurt, etc or is this just what happens all the time?
    I was thinking of it happening all the time, as I am trying to create a game like ghosts n' goblins or certain castlevanias where you have to be very careful of when and where you jump.

    Thanks,
    Sp33d

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleMac Export ModuleInstall Creator Pro
    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)
    Tisnart's Avatar
    Join Date
    Feb 2008
    Location
    On, Canada
    Posts
    1,031
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Ok, if I completely understand what you are talking about then this is rather a easy fix.

    -First thing is to remove that last condition that I told you from line 17 (so that the Horiz loop will continue to loop)

    -Next add that same condition to lines 19, 20, 21, 22.
    This will prevent those events from being true once you jump but if you were already moving in either direction (left/right) when you jump the Horiz value will remain the same until you hit the ground again then lines 21,22 respectively will once again be true and bring you to a stop, thus keeping your horizontal momentum until you are back safely on the ground.

    So once again add *Collider is overlapping a backdrop to Lines 19, 20, 21, 22 and remove *Collider is overlapping a backdrop from line 17 like so:

    PlatFix.jpg

  7. #7
    No Products Registered

    Join Date
    Nov 2012
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow, that works perfect! Thank you for all your help, Gerald. I cannot thank you enough!

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleMac Export ModuleInstall Creator Pro
    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)
    Tisnart's Avatar
    Join Date
    Feb 2008
    Location
    On, Canada
    Posts
    1,031
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    No prob and no thanx needed

Similar Threads

  1. Mouse control to act like keyboard control
    By Evilized79 in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 11th July 2011, 07:30 AM
  2. Tab Control
    By Telephone in forum File Archive
    Replies: 4
    Last Post: 26th October 2010, 01:35 AM
  3. Tab control bug?
    By Gibbon in forum Extension Development
    Replies: 0
    Last Post: 5th December 2008, 10:32 PM
  4. Control X BUG!!
    By Locaz00 in forum File Archive
    Replies: 0
    Last Post: 18th November 2008, 06:13 AM
  5. Help with control X
    By kainan in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 27th January 2008, 10:31 PM

Tags for this Thread

Posting Permissions

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