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

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? :/Originally Posted by Dynasoft
If you want you can send me this little code to thethinker82@gmail.com so I can understand well
Thanks!![]()
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 :/

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.
Thanks I'll try it!
How can I finish this code to let the cat move away from the clothes when I press cursor keys?Originally Posted by The Thinker
Thanks

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.