-
Movement Assistance
So, I'm making a game. My character gets caught on backdrop objects a lot, like he'll jump and his chin will make him hang off the edge of something. Any pointers on how to fix this? I'm sure it's something simple I'm not seeing.
Also, I need assistance on making him slide down a slope rather than getting caught on it. Should I just go with a simple object for the slide action?
-
You'd best use the Platform Movement object, instead of the default platform movement. There are some examples in the C:\Program Files\Multimedia Fusion 2\Examples\Platform Movement\ folder.
-
Well, I'll look into it. So far I've had nothing but problems with that object though.
-
I think the problem is because of the animations of the character and the pixels overlapping. To solve this, you need to use a custom platform movement or use the platform movement object. Make a square active the size of your character and set it to be invisible, use this for the actual player movement. Then just always center the player animation to 0,0 relative to the invisible active. What this does is make it so that only the square is used for collision detection as opposed to the irregular graphics of the player animation, so you won't have problems with chins getting stuck, etc. This also means you'll have to start and stop animations manually using player input (start walking animation if player is pressing right or left, etc). It's a bit more work, but it solves everything.
Actually, it would still work with the built in platform movement if you set the invisible active to be the player. You'd still have to do all the rest though.
-
Thanks Shawn. I'd assumed it would be something along those lines. I'll work on the collision detection then.
-
HAHA! I did it! I went with a similar principle. I simply took the character, made a cloned object of him, set it to invisible and made it so that the original was a static object. Then I deleted all the programming (which was set to embedded behaviors for the character) in the original and set it to always have the position, direction and animation as the invisible one. Solved all my problems with little to no time. Thanks for the concept Shawn!
-
Hmm.. nevermind.. he still seems to be falling through objects...
-
Did you make it so that it was a perfectly square object?
-
Hmm, no, not quite. I also didn't use the new collision object. I'll try doing the square part first.
-
One other thing you might try doing on the player object if you don't want to do the hidden collision detector is try unchecking "Fine Detection" in the properties window for the player object. It's listed under Runtime Options in the Properties window. It might not work though if your player has different sized animations when walking or performing actions, it could cause your player to still get stuck on things when the object changes animations. You'd just have to test it out.