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
38
S
15
G
3
Posts: 148
Reputation: 4,573

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
"The intent is to provide subscribers with a sense of pride and accomplishment for unlocking different features...."
B
42
S
18
G
32
Posts: 818
Reputation: 20,779

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
29
S
7
G
58
Posts: 1,229
Reputation: 34,910

Post » Sun Feb 26, 2017 12:59 pm

More information needed. A screenshot would be helpful, a capx would be ideal.
<iframe frameborder="0" src="https://itch.io/embed/146124?linkback=true&dark=true" width="552" height="167"></iframe>
B
26
S
7
Posts: 254
Reputation: 2,389

Post » Sun Feb 26, 2017 2:19 pm

OK how do I send it?
B
38
S
15
G
3
Posts: 148
Reputation: 4,573

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
38
S
15
G
3
Posts: 148
Reputation: 4,573

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.
<iframe frameborder="0" src="https://itch.io/embed/146124?linkback=true&dark=true" width="552" height="167"></iframe>
B
26
S
7
Posts: 254
Reputation: 2,389

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
29
S
7
G
58
Posts: 1,229
Reputation: 34,910

Post » Sun Feb 26, 2017 10:24 pm

B
38
S
15
G
3
Posts: 148
Reputation: 4,573

Post » Mon Feb 27, 2017 4:09 am

what about the gamepad for right analog stick? it will rotate
B
38
S
15
G
3
Posts: 148
Reputation: 4,573

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 3 guests