i need help with custom movement collisoins. In my sky-view game i have a cutom movement and i can't get it so that if you collide with the backround you stop.
That's quite sparse on information.
Don't you use any detectors?
If you do, only add conditions that hinders the movement in a specific direction when appropriate detector is overlapping background.
well i made a custom movement with the "player presses direction" conditions. The thing with not overlapping backdrop doesn't work because he can't move forever. I don't use detectors.
Well, in what manner are you moving the character? Are you using MMF's built-in movements with "speed" or are you moving it with XY positioning? If you use XY positioning you are bound to need detectors if you're not making a very advanced engine.
I suggest you add detectors to your movement engine, they're almost always easy to implent in different types of coding.
The built in 8 Direction is alright, but it has problems; mostly the lack of decelleration when you change direction. Plus using the built in movements doesn't give you the kind of control you could get from a custom engine.
An 8 direction movement is a great way to start coding newbie custom movements though.
Well, that's cause you're doing it wrong. It's important to make sure you only "stop" the movement once, not forever glue the character to the wall.
Make a search in the articles section for custom movement engines or the like and I'm sure you'll find what you need.
Oh, another reason for the 8-dir movement's suckiness, if you walk alongside a backdrop and simultaniously move against the wall you'll turbocharge forward.
Originally Posted by fish20 ok i guess it is better. but i still can't do the collisions even with detectors because the player's object stops forever and can't move any more.
well if you have detectors you can make the player object stop when the detector is overlapping a background, not when the player does. If you have one for each direction, make the event only work when the player is pressing a said direction.
eg
pressing left + left detector not overlapping = move left
then another event
pressing right + right detector is not overlapping = left right
this way the player will only be stuck as if you continue trying to move into the object when you've hit it. pressing another direction will let you move away.