User Tag List

Results 1 to 10 of 10

Thread: Prevent movement while crouching

  1. #1
    No Products Registered

    Join Date
    May 2008
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Prevent movement while crouching

    I've been fooling around with MMF2 for a little over a week now, trying to get down the basic framework for a platformer, and it's all going pretty well. Unfortunately, when I make the character crouch, I'd like him to be unable to move left or right, and I just can't get it to work.

    I've tried making it stop him and set his position back a pixel when pressing both down and right/left. All it does is cause him to slide backwards slowly. Likewise, setting it to just stop his movement causes him to move forward slowly.

    Is there some way to completely stop horizontal movement when the character is crouching?

  2. #2
    Clicker Fusion 2.5 Developer

    Join Date
    Jan 2007
    Location
    USA
    Posts
    691
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Prevent movement while crouching

    What kind of movement are you using; the Platform Movement Object, the built-in, or a custom fastloop one?

  3. #3
    No Products Registered

    Join Date
    May 2008
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Prevent movement while crouching

    Well, at the moment, I'm using the platform movement, but if there's a better way, by all means, please tell.

    How do fastloops work?

  4. #4
    No Products Registered

    Join Date
    May 2008
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Prevent movement while crouching

    You could have an invisible object go to the center of your character when you crouch, then as long as you're crouched, you get moved to the center of that object.

    Creating custom movement is a little bit of work, but then you can control it a lot more, like add extra conditions.
    *Press A
    *Crouch is not set
    =Move left.

  5. #5
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Prevent movement while crouching

    make a seperate movement thats static:

    *Crouch is playing
    -select movement 2 of player

    *Whatever key gets the player out of the crouch (eg. up, or any key)
    -select movement 1 of player

    Hope this helps!

  6. #6
    No Products Registered

    Join Date
    May 2008
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Prevent movement while crouching

    I used a custom fastloop movement to set up different groups for each specific mechanic my character would use. Then I disabled or enabled each group as it was needed. For example, my character uses a Guard state, but I dont want him to walk or jump while guarding, so when I enable the Guard through the press of a button, it also disables the "Move" and "Jump" groups (and then re-eneables them when the button is released).
    You can set this up quite easily by making sure a group is not set to "Activate when Frame Starts". I found the examples for custom fastloop-based platform movement from both here and another site known as the Daily Click, which has a few good tutorials and articles on this.

    Good luck!

  7. #7
    No Products Registered

    Join Date
    May 2008
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Prevent movement while crouching

    You could also set the max speed of the object to 0 and back again in the actions for (un)crouching.

  8. #8
    No Products Registered

    Join Date
    May 2008
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Prevent movement while crouching

    In the effort of keeping it simple, I got it working by setting movement speed to 0 when the crouch animation was playing, and back to default when the "stopped" animation played.

    Thanks for the help. I might try to fool around with more complex techniques later on, but for the moment, I'm investing most of my efforts into graphics and ideas for the game. Hopefully, for once in my life, I'll actually be able to finish a project that I start.

  9. #9
    No Products Registered

    Join Date
    Oct 2007
    Location
    Norway, Oslo
    Posts
    379
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Prevent movement while crouching

    I recommend "The Platform Movement Object" It's very easy to use and very powerful.

  10. #10
    No Products Registered

    Join Date
    May 2008
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Prevent movement while crouching

    That's what I've been doing so far, and it's working out for the most part.

    Thanks for all the suggestions everyone. I'm sure I'll be back with more questions in a day or two.

Similar Threads

  1. Problem with crouching
    By Gurarana in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 25th April 2013, 05:43 PM
  2. Prevent editbox from freezing your app
    By Fimbul in forum File Archive
    Replies: 0
    Last Post: 8th October 2009, 07:47 PM
  3. Prevent Multiple Instance app.
    By Bruto in forum File Archive
    Replies: 6
    Last Post: 16th April 2008, 05:18 PM
  4. Crouching Glitch
    By Karl in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 3rd January 2007, 06:15 AM
  5. prevent resizing app ?
    By Tiles in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 5th August 2006, 09:34 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
  •