User Tag List

Results 1 to 4 of 4

Thread: Limiting Movement

  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)

    Talking Limiting Movement

    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 with the set movements but on this occasion i have made my own custom movement - when w is pressed 'set y position to y object -6' then the same for asd with slightly different code. does anyone know how to do this?
    thanks Lucas

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    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)

    Join Date
    Apr 2007
    Location
    Australia
    Posts
    1,152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Check if your player co-ordinates are outside the screen and add or subtract it's position. The opposite to what you do to move the player

    So in your movement events, you will need to add a check that the player is inside the screen co-ordinates. If they aren't then move them back in!

  3. #3
    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)
    On your W is Pressed Set Y to Y-6 right click the condition and click add new condition. Then add one that says Compare to Y Position is greater than 6.

    That will stop you from leaving on the top. Then you just vary the code slightly to constrain the other directions.

  4. #4
    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)
    Hello thanks for that, i have another problem, how do i do the same thing but with an object

Similar Threads

  1. Limiting an Angle
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 1st May 2013, 09:37 AM
  2. limiting events
    By willow in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 27th February 2010, 09:22 AM
  3. Limiting digits
    By MechatheSlag in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 27th February 2009, 06:20 AM
  4. Limiting Jumps
    By dsilvers in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 3rd February 2009, 02:02 AM
  5. Limiting onscreen projectiles
    By adamwalker13 in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 21st October 2008, 07:42 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
  •