bullet bounces object

  • I'm new in construct 2

    I'm trying to make a shooting game but it's different from common shooting game

    when the player is shooting to the target, the target will move forward as same as the bullet movement. Which means the bullet will push the enemy (one object push the other object)

    the problem which I have right now is the bullet does not push the enemy correctly

    I have tried customMovement behavior to do it but I got confuse with the action of customMovement behavior

    anyone know how to do it??

  • you could use variables to capture the velocity of the object.~

    bullet has below variables

    bulletYvel

    bulletXvel

    every tick

    • Set bullet.bulletyvel to bullet.physics.velocityY
    • Set bullet.bulletXvel to bullet.physics.velocityX

    on bullet collision with enemy.

    set enemy velocity to

    Y = bullet.bulletyvel

    X = bullet.velocityY

    Wait X seconds

    Set enemy velocity to 0,0

    if you enemy is previously moving also store the velocity of the enemy before you set it to the bullets.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could try using the pin object to pin the position of the enemy to the bullet, pushing him backwards.

  • I don't really understand with your instruction

    I'm really newbie in construct 2

    I have set like this

    dropbox.com/s/ibodd6t2mdhz0ff/23-08-2013%2012-41-06%20AM.jpg

    is it correct??

    actually I don't really know how to set the enemy velocity

    how to set the enemy velocity just like in your instruction??

    thanks

    if you don't mind, can you send to me if you have the file for this action?

    thanks

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