[SOLVED] Why my character doesn't push the box well?

0 favourites
  • 10 posts
From the Asset Store
Push the Box Puzzle Game likes Sokoban made with Illustrator
  • Hi guys!

    I'm trying to implement the ability to push objects into my game character (something I thought would be fairly easy), but it's not working well.

    The character pushes very slowly, the defined animation isn't play and after a short time, the character stops pushing the box.

    If anyone can collaborate, I leave here the CAPX for analysis and corrections.

    https://ufile.io/9m53j

    Thanks in advance! <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

  • It's because he failed his ninja training and the box is too heavy. Also it's because you have on collision with box which only ever triggers once, when you are pushing against it you have already collided. For stuff like this I use overlapping at offset, that way you can constantly detect when the player is close to the box. The animation can be fixed by disabling some of the Walk animation events when you are pushing the box, at the moment they just override everything and try and walk whenever the player moves.

    https://www.dropbox.com/s/b0suhzzn6d9mb ... .capx?dl=0

  • It's because he failed his ninja training and the box is too heavy. Also it's because you have on collision with box which only ever triggers once, when you are pushing against it you have already collided. For stuff like this I use overlapping at offset, that way you can constantly detect when the player is close to the box. The animation can be fixed by disabling some of the Walk animation events when you are pushing the box, at the moment they just override everything and try and walk whenever the player moves.

    https://www.dropbox.com/s/b0suhzzn6d9mb ... .capx?dl=0

    LOL! Thank you very much, dude! <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    Just one question: why the box is moved in a shaken way? Can we move it smoothly?

  • Ah yeah sorry I set the speed of the box to 1000 for a test, set it to 40 or something. It does bounce around a bit, can probs be fixed if I looked into it more.

  • Ah yeah sorry I set the speed of the box to 1000 for a test, set it to 40 or something. It does bounce around a bit, can probs be fixed if I looked into it more.

    Thanks, man. ^_^

  • , sorry to bother you again, mas but do you have any idea why the character's animation hangs while he pushes the box?

  • It doesn't hang as such, you just have it set to Stop when pushing, which is one frame. There's no push animation.

  • It doesn't hang as such, you just have it set to Stop when pushing, which is one frame. There's no push animation.

    In the CAPX that I posted here, but in my game's prototype I put an animation for it and it isn't activated.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, I'm no magician

  • Well, I'm no magician

    I used the same routines/events/principles.

    Again, sorry to bother you and thanks.

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