New sprites appearing in wrong place

  • My son is creating a game but he's encountered a problem I can't figure out. He started out with the "platformer" template, re-arranged the platforms somewhat, changed the graphics, etc. He added an enemy that appears on a platform above the player's starting position. No problem there. He wanted the enemy to move up and down and shoot a fireball every second. So I told him to add a fireball sprite somewhere off-screen, add the bullet behavior to it, then add an event that every 1 seconds, the enemy sprite would spawn a fireball sprite at image point 0. According to the manual this should spawn the fireball at the center of the enemy sprite (where the image point is). Instead, it seems to spawn the fireballs at another place somewhere between where the enemy and the player are. Even stranger, if he moves the player while the fireballs are moving, they seem to slow down, speed up and move up and down like they are tracking his movement somehow.

    Here is a gif showing what's happening. The fireballs should be spawning further up above him and they shouldn't move upward when he jumps.

    Thanks in advance for your help.

  • Hello! Image point 0 does refer to the origin which defaults to the centre of an object, however the image point can move if you add new graphics. Open the image editor and look at the imagepoint 0 location, it may have moved below the image (where the fireballs are spawning). You can right-click the origin image point and quick assign it back to the middle.

    The fireballs moving up I believe is an optical illusion because the platformer template comes with layers that have a different parallax. This means that the fireballs are probably spawning on layer 0 which is the background layer and this layer has a slower scroll rate to layer 1 that the player is on. To fix you can set the background layer parallax in the options from 50x50, to 100x100.

    Having the different scroll rates on layers is not helpful for beginners I guess, you can read more about parallax here but in general you can just keep it at 100% :

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • OK, they were in the wrong place because I was putting them into the wrong layer. I didn't realize there were multiple layers in the project with different coordinate systems. Thanks.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)