Recoil!

Get help using Construct 2

Post » Mon May 27, 2013 12:33 am

Hi!

I'm trying to add recoil to a weapon.

I have a doomsday laser, and when that laser is fired I need it to give the player velocity and momentum in the opposite direction.

Currently I have this:

For the player object:

set angle to (laser.angle + 180)
set 8Direction speed to 500

As far as I know this should be all that I need, but it just pushes the player to the right. If I use the "move at angle" function instead of 8Direction then it works, but the player doesn't gain momentum from the movement, which is not good enough.

Any help would be much appreciated!
B
5
Posts: 85
Reputation: 395

Post » Mon May 27, 2013 5:05 am

What about using EaseTween?
http://www.scirra.com/forum/behavior-easetween_topic53288.htmlArcadEd2013-05-27 05:06:19
B
94
S
29
G
11
Posts: 1,545
Reputation: 20,993

Post » Mon May 27, 2013 2:06 pm

Thanks Arcaded, but if I understand this correctly, the object still won't get any momentum if I use EaseTween. Is that right?
B
5
Posts: 85
Reputation: 395

Post » Mon May 27, 2013 2:08 pm

Hmm... I could perhaps use the SetVectorX and SetVectorY to propel the player in the desired angle, but I don't know what calculations I would need to do to set the Vector X and Y values correctly.
B
5
Posts: 85
Reputation: 395


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 27 guests