User Tag List

Results 1 to 3 of 3

Thread: 8 Direction Move Safely 2 Collision Detection - XY Stored on Alt Variables Issue

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleXNA Export ModuleInstall Creator Pro
    Shadeve's Avatar
    Join Date
    Aug 2011
    Location
    GA USA
    Posts
    228
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    8 Direction Move Safely 2 Collision Detection - XY Stored on Alt Variables Issue

    I recently implemented a custom 8 direction movement system to my game. I store the xPlayer and yPlayer as variables, and then I set the x and y position to these variables. I am then trying to use the Move Safely 2 object for collision detection.

    The code for when a player moves up or down is:
    yPlayer = yPlayer( "Player" ) + ( MoveY( "Player" ) * speedControl("Player")

    This causes the Move Safely Object 2 not work, as when a player collides when an obstacle, the yPlayer variable continues to increase while the player remains in the spot moving up against the obsticle, and then suddenly the player warps to the yPlayer coordinate once the player is no longer colliding with the obsticle.

    A solution to fix this is to change the formula to:
    yPlayer = Y( "Player" ) + ( MoveY( "Player" ) * speedControl("Player")

    The problem with this though, is that I can no longer affect the speed properly with a float value like the speedControl variable.

    I am assuming I just have to ditch the Move Safely object and opt for a custom solution that uses the alterable values instead of player position for the push out feature.
    I wanted to post and see if anyone had a good solution already made for an 8 direction custom collision detection system like this, or if anyone had any ideas for how to work with the Move Safely Object for my specific problem.

    Any help or guidance would be greatly appreciated! Thanks!

  2. #2
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)
    elvisish's Avatar
    Join Date
    Oct 2014
    Posts
    678
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    It's times like this when hording mfas can be useful:
    8Directions-Fastloops-and-physics.mfa
    8 Direction Example.mfa
    8 Direction Move Safe.mfa

    Two of those are thanks to the genius of @BartekB and the other is a movesafely example, I can't quite remember where it came from at this time. I'm not quite sure what was wrong with your issue, but these are some good examples of how it can be done. (On the first one, toggle the appropriate group to enable fast loops based movement or physics.)

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleXNA Export ModuleInstall Creator Pro
    Shadeve's Avatar
    Join Date
    Aug 2011
    Location
    GA USA
    Posts
    228
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    The second example was just what I was looking for. Thanks! Maybe I have seen that example before but must have forgotten.

Similar Threads

  1. overlap (custom collision detection) issue
    By Hamcraft in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 26th May 2011, 03:08 PM
  2. Another collision detection issue...
    By fawfulfan in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 24th August 2009, 09:22 PM
  3. Move Safely 2
    By stuckboy in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 22nd June 2009, 12:13 PM
  4. Move Safely and Wrap
    By Olivier in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 21st July 2008, 10:14 AM
  5. Move Safely and Wrap
    By Olivier in forum File Archive
    Replies: 0
    Last Post: 20th July 2008, 09:37 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
  •