Ducking Glitch and 2 completely unrelated queries
This glitch was quite evident to me back when I orginally switched from TGF to Mutimedia Fusion 2, but I always kinda ignored it since back then I never though I would have come this far on this game.
Anyway, when you duck down, you for some reason are able to continue to move when normally (In TGF) you movement would stop. And that isn't the oddest part, it allows you to travel horizontaly (even through air provided you dont collide with anything) as long as down is pressed along with either left or right. Here are a few photos for example (Apology for the huge SShots, wanted people to have an idea what im working with):
http://img394.imageshack.us/img394/7...omansc1qk0.png
http://img49.imageshack.us/img49/2718/robomansc2gz3.png
A few other character in my game have no ducking animations and weren't intended to duck, and this strange phenomenon does not occur with them even when pressing down. So im fairly certain it has something to do with the ducking animation screwing with movement logic in the system.
And for the 2nd question (Much easier to figure out, I suppose):
Let say i've got an enemy on the screen, standing on a standard platform and the platform is only 10-15 pixes from the bottom of the screen. I jump up, the screen scrolls up with me leaving the platform just off screen. The enemy now falls through the nothing and off the world.
Is there a way to keep this from happening?
Also, how do you calculate the exact screen area that your player is in at any given time? I wanted to use this to make enemies begin to fire as soon as I come onto screen.
So many questions.....
Any help would be greatly appreciated,
Thanks,
-Nick
Re: Ducking Glitch and 2 completely unrelated queries
One answer for all your questions is make a custom movement to control your player, the basic platform movement has always been buggy.
You sould be able tho find some examples on how to do this in the form.
Re: Ducking Glitch and 2 completely unrelated queries
Seems like kinda a waste to do a custom platform movement when there is only one small thing wrong with it. And im not entirely sure how doing that would have an effect on the last 2 questions.
Re: Ducking Glitch and 2 completely unrelated queries
You can use the "Handle background collisions even in invisible playfield" option in Frame Properties to sort out the second point, and there's an "Object is less than X pixels away from window's edge" condition that you can use to detect if the player's nearby.
The custom platform movement is good advice, though might seem like a big undertaking if you're a beginner. There are so many problems with the default platform movement that replacing it is definitely worthwhile.
Re: Ducking Glitch and 2 completely unrelated queries
With a custom movement your character wont drop through the floor you can handle collition detection much better.
For the enemys starting to fire as you move into screen you could use: x pos of enemy - x pos of player <= 640 then enemy shoot.
Or you could use a distance calculator.