How do I set the direction to left or right on mouse control

Get help using Construct 2

Post » Sun Feb 26, 2017 5:13 am

there is a small problem ive just discovered. i set a gun to the mouse for rotation, but when turn it to the other side, it rotates. How do i fix this problem?
B
30
S
13
G
3
Posts: 132
Reputation: 4,141

Post » Sun Feb 26, 2017 10:33 am

Sounds to me like you want to set the direction of the sprite only left to right?
Use MIRROR
https://www.dropbox.com/s/mqsn1x1bdac9s ... .capx?dl=0
Image Image Image
B
29
S
11
G
27
Posts: 730
Reputation: 17,002

Post » Sun Feb 26, 2017 12:33 pm

Bobbyneal100 wrote:there is a small problem ive just discovered. i set a gun to the mouse for rotation, but when turn it to the other side, it rotates. How do i fix this problem?



You mean the image flips?

You can set the sprite to NO in rotations and choose just left and right directions and use mirror.

If it is a turret this is my Turret CAPX:

https://static3.scirra.net/uploads/arti ... ttack.capx
Banned User
B
27
S
7
G
58
Posts: 1,229
Reputation: 34,780

Post » Sun Feb 26, 2017 12:59 pm

More information needed. A screenshot would be helpful, a capx would be ideal.
The LEVEL GENERATOR TOOLKIT



24 functions dedicated to producing randomly generated terrain for all kinds of games.
B
25
S
7
Posts: 242
Reputation: 2,306

Post » Sun Feb 26, 2017 2:19 pm

OK how do I send it?
B
30
S
13
G
3
Posts: 132
Reputation: 4,141

Post » Sun Feb 26, 2017 2:29 pm

yeah flip image. Also, once i stop aiming and move around, it stays in that position
B
30
S
13
G
3
Posts: 132
Reputation: 4,141

Post » Sun Feb 26, 2017 2:29 pm

Upload it (screenshot or capx - if it's a capx please try to provide the smallest possible capx that still represents your problem) somewhere (Dropbox, Google Drive, etc), mark the file as public, then post the link here.
The LEVEL GENERATOR TOOLKIT



24 functions dedicated to producing randomly generated terrain for all kinds of games.
B
25
S
7
Posts: 242
Reputation: 2,306

Post » Sun Feb 26, 2017 2:37 pm

Bobbyneal100 wrote:yeah flip image. Also, once i stop aiming and move around, it stays in that position


You need to set the position of the turret using Every Tick.

Every Tick: Set angle Turret to Mouse X Mouse Y

You can look at that CAPX I linked to and see how I do it using mouse or touch.
Banned User
B
27
S
7
G
58
Posts: 1,229
Reputation: 34,780

Post » Sun Feb 26, 2017 10:24 pm

B
30
S
13
G
3
Posts: 132
Reputation: 4,141

Post » Mon Feb 27, 2017 4:09 am

what about the gamepad for right analog stick? it will rotate
B
30
S
13
G
3
Posts: 132
Reputation: 4,141

Next

Return to How do I....?

Who is online

Users browsing this forum: Unconnected and 23 guests