how to make collition between 2 sprites (couldent find tut)

0 favourites
  • 6 posts
From the Asset Store
Use this game pack to create your own game, modify the existing game or simply take a look and see how it was made.
  • hi everyone. i tried to find tutorials about how to make collision between 2 sprites. can someone tell me how to do that or give me a tutorial?

  • Every object you create on the layout has a collision box, you can edit the size and shape of the collision box of the sprite objects.

    You use collisions to trigger events. Enemy on collision with player triggers damage.. or anything like that.

    Try reading the manual: https://www.scirra.com/manual/121/event-sheets

  • I think you can also add a behavior that will make it solid, so nothing can pass through it. It should be in the attributes if needed

    The collision box is editable and there are events "on collision" so you can decide what happens when the two objects touch

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Every object you create on the layout has a collision box, you can edit the size and shape of the collision box of the sprite objects.

    You use collisions to trigger events. Enemy on collision with player triggers damage.. or anything like that.

    Try reading the manual:

    i didnt succes to do it. if its not clear i just want the player object wont pass through the wall object. (in top down shooter game)

    for example if i have 2 sprites: player , wall

    i wrote in the event sheet: player- on collition with another object (i chose wall) - add collitions enbaled

    and it didnt work.

    so i wrote in the event sheet : when start of liyout set player solid behaviour enbaled

    and when start of layout set wall solid behaviour enbaled

    and it didnt work too.

  • You don't need to add a event for that. Just add the solid behavior to both player and wall sprite and they won't move past each other.

    If you set both behaviors and it's still not working try cheking if the player is not moving too fast. Moving too many pixels per second may make the player pass through thin objects.

    But if you try all this and it's still not workig try to upload your .capx file so qe can take a better look on what you're doing

  • You don't need to add a event for that. Just add the solid behavior to both player and wall sprite and they won't move past each other.

    If you set both behaviors and it's still not working try cheking if the player is not moving too fast. Moving too many pixels per second may make the player pass through thin objects.

    But if you try all this and it's still not workig try to upload your .capx file so qe can take a better look on what you're doing

    thank you for the help. becouse the forum rules i cant send you the file. can i send it to you on your site? (ray-ki.deviantart.com)

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