User Tag List

Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 21

Thread: How do I change jump speed? - FastLoop Custom Platform Movement by DavidN

  1. #11
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)
    My guess is that you are not defining when you are in a "fall" state. I would only apply gravity if your floor detector is not overlapping an object. You could also add a flag that is toggled on when you jump/fall. Then you only apply gravity when it is on. The moment you hit a floor, turn the flag off.

  2. #12
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    May 2016
    Location
    Canada
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, I tried both of these methods but unfortunately the issues still remain.

    I managed to fix the odd stuttering when the player stood on an active with the "obstacle" qualifier by just copying the events I had for the player landing on a backdrop and replacing the old events for landing on the 'obstacle' qualifier. My bad, must've missed something while converting everything to floats.

    Anyway, I seem to be left with one last issue. The player stutters when passing through the side of an active with the 'obstacle' qualifier and can freely and easily pass through the side of a backdrop:
    https://i.gyazo.com/b6d51b4e03caae16...fef97cfb4f.mp4

    I'm guessing this is somehow related to the float values I added in earlier, even though they're set to 1.0 just to test everything.

  3. #13
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)
    Double check you are pushing the player back in your fastloop when interacting with backdrops AND actives. Also make sure the actives are part of the qualifier..

  4. #14
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    May 2016
    Location
    Canada
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I checked for that earlier and didn't notice that the order of the events was the problem, so good thing you pointed that out.

    I went back and found this:
    + On loop "Horiz"
    (player) is overlapping a backdrop:
    Set Horiz(player) to 0
    Set floatX(player) to floatX(player) - (horiz(player)/Abs(horiz(player))

    and changed it to
    + On loop "Horiz"
    (player) is overlapping a backdrop:
    Set floatX(player) to floatX(player) - (horiz(player)/Abs(horiz(player))
    Set Horiz(player) to 0

    This fixed the issue. While testing this, I noticed that when the player bumped their head on an obstacle, they would lose all vertical momentum. I was able to fix this by doing the same thing for the "Grav" loop changing the grav_(player) to be 0 before adding to the floatY, if you understand what I'm trying to say.

    So this means everything works fine, that is until I make it so the player's WalkSpeed Value 0.5 as opposed to 1. Now the player won't left or right.
    Which is strange, considering I used the same technique I was given earlier to make the player's gravity a float value which works.

    Any ideas for this one?

  5. #15
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)
    Make sure you are adding float values and that your variable that are using floats are set to a float initially. This means using (for example) 1.0 instead of 1 and check the debugger to see if they are in fact floats.

  6. #16
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    May 2016
    Location
    Canada
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mobichan View Post
    Make sure you are adding float values and that your variable that are using floats are set to a float initially. This means using (for example) 1.0 instead of 1 and check the debugger to see if they are in fact floats.
    I just checked, and I can confirm that the WalkSpeed Value is a float. When I start the game and check the debugger, it's set at 0.5 . And my Horiz value even sets to 0.5 when I'm trying to go right and -0.5 when trying to go left.

    I believe the player isn't moving due to the following:
    + Horiz of (player) <> 0:
    Start loop "PlayerHorizontal" and run it Abs(Horiz(player)) times

    I'm not too sure though, as I made a new value that is always set to Abs(Horiz(player)), and when I check the debugger it shows the float value 0.5 I set for WalkSpeed and have Horiz capped at.

  7. #17
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)
    I am pretty sure Fusion will round any float DOWN to the nearest integer. So 0.5 will be rounded down to 0. You could try either changing your "Horiz <> 0" to ---> "Horiz <> 0.0" OR change your start loop to run "Ceil(Horiz) times". This will round up whatever the result is to the next higher integer.

  8. #18
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    May 2016
    Location
    Canada
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mobichan View Post
    I am pretty sure Fusion will round any float DOWN to the nearest integer. So 0.5 will be rounded down to 0. You could try either changing your "Horiz <> 0" to ---> "Horiz <> 0.0" OR change your start loop to run "Ceil(Horiz) times". This will round up whatever the result is to the next higher integer.
    Okay I changed "Horiz <> 0" ---> "Horiz <> 0.0" and got the same results, so I tried starting the loop "Ceil(Horiz) times". This does round up the number but does result in round values such as 0.5 up to 1 of course, so the movements come back as but it's still not quite sub-pixel movements as the value is rounded up

  9. #19
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)
    It is probably simpler if you post your mfa so we can take a look at where things went wrong.

  10. #20
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    May 2016
    Location
    Canada
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mobichan View Post
    It is probably simpler if you post your mfa so we can take a look at where things went wrong.
    Okay, here is the .mfa file: http://www.mediafire.com/file/822t6g...orm%20Test.mfa

    I store all the player variables in the 'player_values' object.

    Keep in mind that at any point in this thread that I mentioned the "Grav_" value, that it's actually "Vertical" in my .mfa file.
    And as for the Horiz value, it's actually "Horizontal", again located in the 'player_values' object.

    As for the loops, "Grav" is really "PlayerGravity" and "Horiz" is "PlayerHorizontal". Just wanted to make that clear!

Page 2 of 3 FirstFirst 1 2 3 LastLast

Similar Threads

  1. DavidN's Custom Platform Movement jump
    By Emerson3 in forum Fusion 2.5
    Replies: 6
    Last Post: 3rd June 2015, 04:17 PM
  2. Trouble with DavidN's Fastloop Custom Platform Movement
    By TheFieryPlumber in forum Multimedia Fusion 2 - Technical Support
    Replies: 15
    Last Post: 27th June 2014, 01:04 PM
  3. DavidN's Fastloop custom movement question (horizontal speed)
    By Macaw in forum Multimedia Fusion 2 - Technical Support
    Replies: 14
    Last Post: 16th August 2013, 09:41 AM
  4. DavidN's Custom Platform Movement Help
    By SuperChiken in forum The Games Factory 2 - Technical Support
    Replies: 16
    Last Post: 7th August 2009, 08:06 PM
  5. DavidN custom platform movement
    By Zabooza in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 16th March 2009, 08:19 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
  •