User Tag List

Results 1 to 8 of 8

Thread: Walls

  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
    374
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Walls

    Hello, I am currently developing a game. I know how to stop a player from exiting the screen but I don't know how to make a player stop when it hits an obstacle (wall). I know how to do this with the set movements but on this occasion I have made my own - when w is pressed 'set y position to y object -6' then the same for asd with slightly different code. Can anyone help me with this?
    thanks Lucas

  2. #2
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    919
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    A really basic answer would be to have something like 'If player presses right' + player is not overlapping an obstacle then X = X + 1.

    But you're likely going to need invisible detectors to do this right, make and set them always to the right and left sides of the character and then use that for your movement conditions->

    'If player presses right' + Right Detector is not overlapping an obstacle then X = X + 1.
    'If player presses left' + Left Detector is not overlapping an obstacle then X = X - 1.

    There's plenty of tutorials and examples out there for this very thing and I've found them helpful too, you should search the forums I'm sure you'll find a good example mfa in no time.

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,729
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    There are examples on my website.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  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
    374
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    marv its a bit complicated/don't get it do you have an easier way

  5. #5
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)
    ratty's Avatar
    Join Date
    Apr 2012
    Posts
    1,116
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    when w is pressed +player is not overlapping an obstacle 'set y position to y object -6'

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Lukiester's Avatar
    Join Date
    Feb 2014
    Location
    Melbourne
    Posts
    374
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    when i go into the obstacle it stops me but then i cant move

  7. #7
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)
    ratty's Avatar
    Join Date
    Apr 2012
    Posts
    1,116
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Have you tried using detectors on either side of the character? For example, if the character is tries to move right and the right detector isn't obstructed, he will move. If he tries to move right and the right detector is obstructed, he won't move. Same for left. That way if you move right and stop, you can still move left freely.

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

Similar Threads

  1. PMO walls and X velocity Help
    By Atherton in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 20th October 2009, 01:44 AM
  2. I need help in jumping Walls.
    By Carlos182 in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 5th October 2009, 07:39 PM
  3. Help with walls
    By Grim in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 29th July 2009, 09:08 PM
  4. Walls in iso?
    By Horn in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 15th June 2007, 09: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
  •