How do I push enemy

0 favourites
  • 10 posts
From the Asset Store
Push the Box Puzzle Game likes Sokoban made with Illustrator
  • hi to all

    when a enemy go in collision whit player i want he bounce.. like a push.. how do i??

    tnk in advance

  • Hi, to begin with can we have some details about your game, is it a plateform game? 8 direction?

  • Hi, to begin with can we have some details about your game, is it a plateform game? 8 direction?

    platform behavior and is platform game.. but when enemy touch player just flash.. and i want push

  • Do you want the enemy to stay on the floor when pushed or with a little jump?

  • Do you want the enemy to stay on the floor when pushed or with a little jump?

    little jump is better tnk

  • In that case, if your enemies uses platform behavior, you need to set their vector X and Y on player touch, and depending of their position relative to player it will be a negative or positive number for vector X, and a negative number for vector Y to simulate a small jump

    Edit : what are your enemies acceleration and deceleration parameters?

  • In that case, if your enemies uses platform behavior, you need to set their vector X and Y on player touch, and depending of their position relative to player it will be a negative or positive number for vector X, and a negative number for vector Y to simulate a small jump

    + player: On collision with enemy

    ----+ player: X ≤ enemy.X

    -----> player: Set Platform vector X to -600

    ----+ player: X ≥ enemy.X

    -----> player: Set Platform vector X to 600

    and working.. but he do just a very little push and if i change -600 whit -6000 nothing happen

  • That's why I asked about your objects acceleration and deceleration, and it is related to their maximum speed too, what you can do if you don't want to mess with those parameters, is to give them a variable or boolean, and if true, apply vector X, and turn it off with a timer

  • That's why I asked about your objects acceleration and deceleration, and it is related to their maximum speed too, what you can do if you don't want to mess with those parameters, is to give them a variable or boolean, and if true, apply vector X, and turn it off with a timer

    solved tnk you

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Perfect, good luck for your game ~

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