Problem with solid sprites -> teleportation ?

This forum is currently in read-only mode.
From the Asset Store
Various Bell Sounds (from small to huge) / 35 Unique Clips / 2:46 minutes of audio
  • Hi guys

    First I apologize for my bad english, I hope someone can understand what I'm writing ^^'

    I have a problem with at least 3 sprites with the attribute "solid".

    The first is just a wall, he can't move.

    The second has the behavior 8 directions.

    The third has the behavior bullet and has for direction the second sprite.

    The problem I have is when my 8 directions sprite is blocked between the wall and the bullet. If I try to move, he is teleported behind the bullet, or behind the wall.

    Why ? How can I avoid this ?

    If this problem was treated in another post, I'm really sorry I didn't find it (wrong words in the research ? ^^'), so if someone could redirect me...

    Thanks a lot

  • Upload your .cap so someone can have a look.

  • Yeah this is :

    http://dl.free.fr/qlPdTPPfp

    Thanks

  • Okay, as far as your bullets go, there is an easy fix: DON'T make them Solid . They don't need to be Solid. They work just fine when they are not solid.

    As for your black hearts... there is not a lot you can do about that if you want them to push the player. If two hearts push on the player from different directions, you will get strange results. The player will teleport, or jitter, or get stuck.

    There a few things you can do to fix this:

    1. Do not make enemies or bullets solid. Make only the player solid, and any walls or obstacles that do not move. As a general rule, if an enemy or a bullet is moving, then you probably should not make it solid.

    2. Use Physics instead of 8Direction on your player, and use Physics instead of Bullet on your hearts. (You will have to make them move with events.) That way they can push each other around all day and it will work properly. Physics behavior is made to have solid collisions with many moving objects, Bullet behavior is not.

    3. Write your own custom collision routines with events. This is not recommended for beginners.

    Good luck

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok, I'll try the second solution, the goal is to destroy black hearts before they push you on the left.

    Thanks a lot

    (and thank you for your tutorials, thez were very helpful to me )

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