User Tag List

Results 1 to 9 of 9

Thread: Movement Help

  1. #1
    Clicker iOS Export Module

    Join Date
    Sep 2013
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Movement Help

    Hey guys, I'm new around here and hope I'm posting in the right place!

    How do I make a movement so if the player presses left/right/etc. then the movement will continue until there is a collision with another object. That is, the movement continues in the same direction that was pressed even when the key is released. I can get the movement to continue whilst being held, but I need I want the continuous movement when its just pressed, not held. I hope that makes sense!

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mykal View Post
    Hey guys, I'm new around here and hope I'm posting in the right place!

    How do I make a movement so if the player presses left/right/etc. then the movement will continue until there is a collision with another object. That is, the movement continues in the same direction that was pressed even when the key is released. I can get the movement to continue whilst being held, but I need I want the continuous movement when its just pressed, not held. I hope that makes sense!
    Welcome to the forums! I feel that you've explained the problem quite well, by the way, and, also, this is the right place, though, if it wasn't, a moderator could have moved it to the right place.

    Anyway, I'll make you an example as soon as I have the time to. It will be thoroughly-commented, so it should be easy to understand.

  3. #3
    Clicker iOS Export Module

    Join Date
    Sep 2013
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thankyou, and thankyou for the quick reply!

    I look forward to the rest

  4. #4
    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,734
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    mykal. There are some movement examples on my website.

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

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Okay, I've made an example. It's attached. Enjoy!
    Attached files Attached files

  6. #6
    Clicker iOS Export Module

    Join Date
    Sep 2013
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the responses.

    To expand on these movements... How would I set it so that if the movement is locked to moving left then pressing right/up/down won't override the movement until there is a collision?

    The idea is that if player character moves the wrong way and falls off the screen, they die. But currently they could press right and intervene the falling off to the left.

    I tried the object bouncing > ignore inputs, but doesn't seem to work.

    Thanks!

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Easy. Just add a check to see if the X and Y velocity are both equal to 0 for all of the arrow key events.

  8. #8
    Clicker iOS Export Module

    Join Date
    Sep 2013
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, no doubt look like a total idiot right now but I can't seem to find the 'compare to one of the alterable values' on the 'upon pressing key' events. I assume that is the option I'm looking for, in the right place? *sighs*... Feel like a total idiot!

  9. #9
    Clicker Fusion 2.5 Developer
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    J3sseM's Avatar
    Join Date
    Feb 2013
    Location
    Finland
    Posts
    868
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hello mykal!
    Welcome to forums.

    If I understood correctly you could just add a event to arrow key events like happygreenfrog suggested.

    Right click "upon pressing right arrow" and click "insert" then look for your object -> compare one of the alternable values then choose that X velocity is equal to 0 etc.

    That way the command only applies when the value is equal to 0.

    EDIT: And don't worry! It takes some time to get used to everything.

    -Jesse

Similar Threads

  1. Movement synchronization issues (physics spaceship movement)
    By SecondSons in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 24th January 2014, 11:52 PM
  2. [Possible BUG] Clickteam Movement Controller vector movement
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 16th November 2012, 02:10 AM
  3. Platform movement on Active objects using Nifflas' basic movement widget
    By ac3raven in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 18th October 2012, 03:16 AM
  4. Spaceship movement left and right trought bouncing ball movement instead 8 direction?
    By daryuss in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 22nd May 2012, 10:33 PM
  5. Custom Movement problem (Horizontal movement)
    By KiteRyagara in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 7th June 2008, 04:40 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
  •