Make a turret movement but by arrow keys

Get help using Construct 2

Post » Wed Mar 06, 2013 8:20 am

I know how to provide control from keyboard keys.

I have this sprite which consists of a turret base, and a turret head (sort of a pistol barrel) which I want to rotate when shooting at enemy.

Now I want to rotate the turret head about the point where its base lies in the turret base.
Please look at the image



The circled part is about which I want to rotate the turret head, using left and right arrow keys.

I tried to add 'Rotate' behaviour to turret head, and I also use 'Pin' and pinned it to turret base, and then I applied keyboard event to make smooth clockwise and anti clockwise rotation of the turret head about the point.

But what happened wasn't what I expected. The turrethead's end completely goes off the turret base, the rotation isn't smooth (i tried different speeds and acceleration values).

I just don't know how to do this simple thing.
austinpayne262013-03-06 08:26:28
B
6
Posts: 6
Reputation: 489

Post » Wed Mar 06, 2013 8:37 am

Here is an simple example:

Rotating turret
B
24
S
8
G
7
Posts: 756
Reputation: 7,202

Post » Mon Apr 01, 2013 5:08 am

Thanks. I'll look into it and tell you later how useful was it.
B
6
Posts: 6
Reputation: 489

Post » Mon Apr 01, 2013 5:13 am

I have release r119.

when I open the project, i'm being told that this project was made using r121 version, and can't be opened.

Could you just tell me what's being done in the project ? What behaviour or settings are being used? I just need to know that little bit.
B
6
Posts: 6
Reputation: 489


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 23 guests