bullet bounces object

Get help using Construct 2

Post » Thu Aug 22, 2013 5:46 am

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??
B
2
Posts: 4
Reputation: 160

Post » Thu Aug 22, 2013 8:40 am

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.JWstudios2013-08-22 08:42:39
B
10
S
2
G
1
Posts: 77
Reputation: 1,278

Post » Thu Aug 22, 2013 9:54 am

You could try using the pin object to pin the position of the enemy to the bullet, pushing him backwards.
B
123
S
43
G
41
Posts: 847
Reputation: 28,206

Post » Thu Aug 22, 2013 4:07 pm

I don't really understand with your instruction
I'm really newbie in construct 2

I have set like this
https://www.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?
thanksbudiczras2013-08-22 17:57:14
B
2
Posts: 4
Reputation: 160


Return to How do I....?

Who is online

Users browsing this forum: David181, dop2000, evillair, tarek2 and 47 guests