User Tag List

Results 1 to 7 of 7

Thread: Out Of Bounds

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Lukiester's Avatar
    Join Date
    Feb 2014
    Location
    Melbourne
    Posts
    373
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Cool Out Of Bounds

    Hello, i am currently developing a game and was wondering how to stop a player/object going out of the screen, i know how to do this normally but on this occasion i have made my own custom movement. does anyone know how to do this?
    thanks Lucas

  2. #2
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It all depends how you have your movement set up, but the easiest way is to just put a border of obstacle blocks outside your frame. If you're using a simple vector system where you add acceleration to velocity and velocity to position you can just change that last action from position = position + velocity to position = min( max( X Frame Left, position + velocity), X Frame Right)

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Lukiester's Avatar
    Join Date
    Feb 2014
    Location
    Melbourne
    Posts
    373
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    i am using when w is pressed 'set y position to y object -6 and so one

  4. #4
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    944
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Best and easiest way I know is to make a giant rectangluar frame w/ an active object that's a bit larger than your visible play area and use it as an obstacle. I did something like this not long ago to keep bullets from the hero from hitting enemies and stuff that were too far away.

  5. #5
    No Products Registered

    Join Date
    Nov 2013
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Isn't "Test Position" specifically made for this issue?

  6. #6
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    944
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    That might work too, but I really only use the 'Test Position / Outside of Frame' to destroy objects and not to try and stop a character from moving out of bounds. (?)

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleXNA 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)
    piscesdreams's Avatar
    Join Date
    Dec 2007
    Location
    United States
    Posts
    1,027
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    I have always just made it where when active is x left frame + half the size of the active = active x + half its pixel size. Its always created a firm wall. Just tinker with it depending on your object size and how many pixels it moves. If youre moving 6 pixels to the left then add 6 or 7 and see how the results are for you. Always works for me.

Similar Threads

  1. MMF2.5 Arrays and going out of bounds
    By hellii in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 25th January 2014, 08:04 AM

Posting Permissions

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