I'm really lame and can't use custom movement. AndyUk even built an engine for me but i can't even use that! So i'm sticking to a modified built in platform movement at the moment. I need to find a way to make my character stop when he hits the roof and fall back down rather than just bounce around on the roof. Any ideas???
I know how you feel cielx. I was the same way. But seriously, you need to use a cpm. I would suggest just downloading every cpm ever made and just studying them until you figure out how they work. Here is a very easy step by step tutorial on making one. Just follow the steps and you should have it.
But if your still set on modifying the default...Create a counter(or use an alterably value)and create a detector as wide as your player and a couple of pixels thick.
Always---Set Y to Y of player+ Counter value
Always---Set detector position to players head
When detector collides with background---set Counter to -4
If detector is over obstacle---Ignor player control
If detector is NOT over an obstacle----Restore control
I think that should work. Even that is the basics of a cpm
Using the built in platform movement majorly hinders your game. It will be a lot better if you take some time to learn your own way to make stuff happen via the event editor. Trust me it will be worth the effort.
The basic principles of custom engines really are simple:
Repeat while Player presses left
--Set X position of object to X("object")-1
Repeat while Player presses right
--Set X position of object to X("object")+1
That's one of the most basic custom movements you can do. It just moves something left and right.
But that's ultimately how the movements work. Every custom movement that exists is just a variation on that theme.
I know what you mean about custom movements seeming hard, cos I felt the same way, but you'll get there.
And don't completely discount built in movements anyway. I often use built in movements as the basis for something. Normally eight-way movement, since i don't find that buggy in the least. I often build a bit more complexity into it after that (such as jumping in 8-way movement).
It works very well for a basic engine, but I find that it's very unreliable if you have events that check whether the object controlled by it collides with other actives. To get round this, you can use an invisible "collider" object that follows the player around, and use that for collision events.
I should also mention that the Movement Object (not Platform Movement Object) can be used as well - it's more difficult to get a solid engine with it, but it's a lot more flexible.