Enemy sprites bounce up and down

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • So to start out I'm going to say this is not an action point or a hot spot issue. I have a level in my sidescrolling game that is roughly 10000 pixels x 4000 pixels in size. I use a smooth scrolling technique that pretty much centers on the player. My enemies work perfectly throughout my entire level until you reach the end area. What happens at the end is you reach a point where the camera centers on an invisible active instead of centering on the player. So now your confined to one screen area. You have to destroy all the enemies in this area before the camera centers back on the player so that you can keep scrolling through the level. Heres the problem. Once the camera is centered on the invisible active instead of the player the enemy sprites that are in that area shift upwards about 10 pixels and then snap back down into place. This happens about every 5 seconds regardless of which animation of the enemies are playing. There are 3 different kinds of enemies in this area and they all do it at the same time every time. These same enemies work fine throughout the rest of the level. All i can think of is that it has something to do with the camera being centered on this invisible active object instead of the player. IDK why that would matter though. Also all 3 enemy types that do this use the PMO for their movements and collisions. And it is just their sprites that do this and not their collision box objects. Im stumped. Thank you in advance for any help or suggestions.

  • So I just tried to recreate the problem so i could upload the mfa for you but the problem didnt happen in my recreation. My original mfa has about 700 lines of code. The recreation only has I think 13. But i set up the enemies the same with the PMO and the camera exactly the same. So I dont really know how to recreate this issue without recreating all 700 lines of code from the original mfa.

  • Also I just looked at it again and it does appear that the enemies collision boxes are floating upwards and snapping back down with the enemy sprites as well. This happens even when they are just standing there playing there stopped animations and not moving.

  • Alright guys, I just figured it out whats causing it. Like i said all three enemies in that area use the Platform Movement Object. But there is also an enemy that does not use the PMO in that area. They are bats that i create just off screen every 5 seconds and then they fly across the screen adjusting there x position using for each loops. IDK why this is causing my PMO enemies to float but it happens every 5 seconds right when the bats are created. I turned off the code for the bats and it fixes the problem. Once i figure out what exactly it is in the code thats causing this I can reply again and let you guys know if youre interested.

  • So this only happens when the bats are off the left edge of the screen whether theyre created off the left edge or they fly from the right and exit off the left edge. As soon as there is a bat off the left edge of the screen it happens. This doesnt happen when theyre off the right edge of the screen. And i do destroy the bats as soon as they leave the screen but you can still see the other enemies float for a second. Its very strange. I have to figure it out because for that particular fight i want bats to be able to come from both sides. They always come from the side that the player is farthest away from so that you dont get jipped if youre standing close to the edge of the screen and a bat just appears on you lol.

  • Try to increase the object limit on your frame to 20,000 in the frame properties, that issue you're having sounds familiar.


    That won't fix that, that's no-where near the problem. That just increases the amount active objects you can place in a frame.

    Please login to see this link.Please login to see this link.
    Take a course in Clickteam Fusion Please login to see this link.
    Youtube Please login to see this link.
    Please login to see this link.

  • So for now i had to make it so that when i create a bat off the left edge of the screen on the same line of code i set its position to be just on the left of the screen. And when a bat flies from the right to the left i have to destroy it when it is within 2 pixels of the left edge. Its not visually noticible and this insures there are never any bats of the left edge of the screen so my other enemies dont float. It still makes no sense to me why I can have bats off the right edge but not the left edge but this workaround will do for now.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!