User Tag List

Results 1 to 8 of 8

Thread: How to fix character on moving objects

  1. #1
    No Products Registered

    Join Date
    Oct 2006
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to fix character on moving objects

    I can't fix my character (the cat) on the moving clothes, and let the cat follow them, how can I do?

    Thanks

  2. #2
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to fix character on moving objects

    The simplest way is like this:
    When you want to lock the cat to something, set it's Alt W to fixed("clothes"), Alt X to X("Cat") - X("clothes") and Alt Y to Y("Cat") - Y("Clothes")
    Then do:
    Alt W of cat not equal to 0
    +Compare to fixed value of ("clothes") = Alt W("Cat") (must be this way, if you can't compare to fixed value then it must be a fast loop. Don't have mmf on hand to look)
    Set X of cat to X("clothes") + Alt X("Cat")
    Set Y of cat to Y("clothes") + Alt Y("Cat")

    When you jump off the clothes set W to 0

  3. #3
    No Products Registered

    Join Date
    Oct 2006
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to fix character on moving objects

    Quote Originally Posted by Dynasoft
    The simplest way is like this:
    When you want to lock the cat to something, set it's Alt W to fixed("clothes"), Alt X to X("Cat") - X("clothes") and Alt Y to Y("Cat") - Y("Clothes")
    Then do:
    Alt W of cat not equal to 0
    +Compare to fixed value of ("clothes") = Alt W("Cat") (must be this way, if you can't compare to fixed value then it must be a fast loop. Don't have mmf on hand to look)
    Set X of cat to X("clothes") + Alt X("Cat")
    Set Y of cat to Y("clothes") + Alt Y("Cat")

    When you jump off the clothes set W to 0
    Which menu have I to use to set these strings and value? :/

    If you want you can send me this little code to thethinker82@gmail.com so I can understand well

    Thanks!

  4. #4
    No Products Registered

    Join Date
    Oct 2006
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to fix character on moving objects

    To fix cat at moving clothes I did this :

    cat is overlapping clothes

    under cat object icon i set (stop/set position at (0,0) from clothes)

    Now I have to understand how to move cat away from clothes if i press cursor keys because it is fixed forever on the clothes lol :/

  5. #5
    Clicker Multimedia Fusion 2

    Join Date
    Jun 2006
    Posts
    269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to fix character on moving objects

    The way I did it, I make the clothesline and clothes that are hanging on it move 1 pixel at a time right?

    The rope gets set back to it's original position every 4 pixels if I remember right and it still gives the appearance of moving because of how I draw the rope.

    I use the same code to move the clothes(except they don't get set back every so many pixels for obvious reasons), clothesline, rats when they are in stopped position, and the cat when hanging.

    So if the cat is hanging, and the rope is moving then they both get moved at the same pace, the cat doesn't actually get attached to the clothes that it comes in contact with, it just stops falling and goes into "Hang mode." If you catch my drift.

    There's 3 speeds for the rope, stopped, slow, and fast.

    For the fast speed I still move it 1 pixel at a time but I use 2 fastloops every frame for the movement(and this applies to the other objects that move with it.)

    I use a random counter that is either 0 or 1 to decide if it's moving or not, and I use another random counter that is 0 or 1 to decide what speed it's moving at.

  6. #6
    No Products Registered

    Join Date
    Oct 2006
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to fix character on moving objects

    Thanks I'll try it!

  7. #7
    No Products Registered

    Join Date
    Oct 2006
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to fix character on moving objects

    Quote Originally Posted by The Thinker
    To fix cat at moving clothes I did this :

    cat is overlapping clothes

    under cat object icon i set (stop/set position at (0,0) from clothes)

    Now I have to understand how to move cat away from clothes if i press cursor keys because it is fixed forever on the clothes lol :/
    How can I finish this code to let the cat move away from the clothes when I press cursor keys?

    Thanks

  8. #8
    Clicker Multimedia Fusion 2

    Join Date
    Jun 2006
    Posts
    269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to fix character on moving objects

    That's hard to answer, it totally depends on how you've made the entire game. Mainly your platform engine. For mine I would just have some code that would only make the cat jump when in hang mode, cause when he is in hang mode he always jumps full speed.


    [list][*]"Hang Mode" = 1 [*]and Repeat while Up is pressed[*]Whatever else might need checked depending on the rest of the values in your game.

    And remember "Hang Mode" is just an Alterable Value that I renamed.

Similar Threads

  1. Player character and block moving grid (example)
    By SpringUp in forum File Archive
    Replies: 0
    Last Post: 27th March 2012, 08:07 PM
  2. Character moving between frames seamlessly?
    By chrilley in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 26th July 2010, 02:04 PM
  3. Help with getting character Walking Moving,
    By Worf in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 8th December 2009, 02:21 PM
  4. Moving Character like in FF series Combat
    By Pyrasia in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 23rd February 2009, 06:45 AM
  5. samaking a trail behind a character while moving..
    By GameDesigner in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 24th April 2007, 09:10 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
  •