How to get my spaceship pulled back when firing a big laser

Get help using Construct 2

Post » Thu Mar 05, 2015 6:22 am

I have a top down shooter Spaceship. It can rotate 360degree. It can fire a big laser. I want to make my ship to get pulled back, when shooting the big laser. Giving a feel of a very powerful weapon.
How to achieve this?
B
10
S
5
Posts: 220
Reputation: 1,464

Post » Thu Mar 05, 2015 7:50 am

@ekajuan

Depends on other parameters.
For example if you are using Custom Movement you could do:
Spaceship - Custom movement set speed = Spaceship.CustomMovement.Speed - recoil

For bullet behavior:
Spaceship - Bullet set speed = Spaceship.Bullet.Speed - recoil
problem with bullet could be, if you have "set angle" to yes, that is you start going backwards spaceship will rotate by 180. It could be solved by additional bullet behavior.

You could also do it manually, with variables, but it would be a long story with more variables like speedX, speedY and cosinus/sinus calculation, but it could be done.
But it would be pointless if you have construct behaviors to do that instead.
B
12
S
6
G
2
Posts: 99
Reputation: 1,727

Post » Thu Mar 05, 2015 8:45 am

...........
You do not have the required permissions to view the files attached to this post.
Image
B
63
S
23
G
7
Posts: 1,475
Reputation: 10,776

Post » Thu Mar 05, 2015 9:12 am

Try this
You do not have the required permissions to view the files attached to this post.
B
243
S
37
G
15
Posts: 1,933
Reputation: 39,969

Post » Thu Mar 05, 2015 2:15 pm

I know its a game so you can do what you like but personally i wouldnt use recoil in this way. First a Laser is just light, and firing one wouldnt cause recoil anyway. If you still want some form of recoil i would suggest you have a separate turret and apply the recoil to that instead.
B
47
S
16
G
9
Posts: 1,097
Reputation: 11,180

Post » Thu Mar 05, 2015 3:32 pm

@korbaach where did you get that laser sprite animation? I need a few animations similar to that...
B
88
S
29
G
14
Posts: 1,145
Reputation: 14,985

Post » Thu Mar 05, 2015 5:36 pm

Image
B
63
S
23
G
7
Posts: 1,475
Reputation: 10,776

Post » Thu Mar 05, 2015 7:49 pm

@korbaach ahh thanks, I'm already using them (as temp animations) I just didn't recognize the laser one you had in the capx. thanks..

I was looking for an artist how can animate like that.
B
88
S
29
G
14
Posts: 1,145
Reputation: 14,985

Post » Thu Mar 05, 2015 10:31 pm

thanks, I can use them too.
renny
B
7
S
1
Posts: 53
Reputation: 535

Post » Thu Mar 19, 2015 9:59 am

Thank yu all for the advices.
B
10
S
5
Posts: 220
Reputation: 1,464

Next

Return to How do I....?

Who is online

Users browsing this forum: SoldjahBoy, Yahoo [Bot] and 7 guests