Rotate hand with a gun toward an angle (control)

Just started using Construct 2? Post your questions here

Post » Thu Jan 22, 2015 11:00 am

Hello, Guys

I want to control a hand's sprite with W (up toward 90 degrees) and S (down toward -90 degrees). I got a difficulty with
2 aspects.

1) When the sprite is turned left his hand is not mirrored correctly.

Image

2) When the sprite is turned left , W and S control is now working upwards.

Image

Here are my events

Image

Image
B
8
S
2
Posts: 48
Reputation: 646

Post » Thu Jan 22, 2015 2:02 pm

First of, the else condition for the S control seems unnecessary.

Both problems can be fixed with the flipped action. Only use this action on your gun sprite, otherwise your player will flip upside down too.

Hope it helped! Goodluck! :)
B
12
S
1
G
1
Posts: 34
Reputation: 591

Post » Thu Jan 22, 2015 2:17 pm

Unfortunately, it did not work.
Image

Image
B
8
S
2
Posts: 48
Reputation: 646

Post » Thu Jan 22, 2015 3:33 pm

You'll still need the mirror action on your gun aswell. So like this:

Event:
On Right arrow pressed
Action:
player Set Not mirrored
gun Set Not mirrored
gun Set Not flipped

Event:
On Left arrow pressed
Action:
player Set mirrored
gun Set mirrored
gun Set flipped


I think it should work like that
B
12
S
1
G
1
Posts: 34
Reputation: 591

Post » Thu Jan 22, 2015 4:47 pm

This is what I got..

Image

Image
B
8
S
2
Posts: 48
Reputation: 646

Post » Fri Jan 23, 2015 7:47 pm

I am guessing that I should work more with events 30-32 to make it work.
B
8
S
2
Posts: 48
Reputation: 646

Post » Sat Jan 24, 2015 8:51 am

It's all a guessing game from here, why don't you share the capx?
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646

Post » Sat Jan 24, 2015 11:14 am

Somebody wrote:It's all a guessing game from here, why don't you share the capx?


Sure, here you go


Ups.. I do not have enough rep to post urls here...
Last edited by heliogame on Sat Jan 24, 2015 11:54 am, edited 1 time in total.
B
8
S
2
Posts: 48
Reputation: 646

Post » Sat Jan 24, 2015 11:19 am

@heliogame
Dude, there it is.
Enjoy !
Demo
Capx
B
11
S
1
Posts: 84
Reputation: 1,462

Post » Sat Jan 24, 2015 11:51 am

Message: heliogame is not yet permitted to post plain text URLS (300 rep required). 2 URLS removed. Why?
newlee wrote:@heliogame
Dude, there it is.
Enjoy !



Thank youuuuuuuuuuuuuuu!!!! :D

Almost done! How would you solve the issue when you raise the arm (W) up to the limits and then when you move it down (S) , it is moving on the other side of the player?

But thanks again, c2 is not so easy as i thought.
You do not have the required permissions to view the files attached to this post.
B
8
S
2
Posts: 48
Reputation: 646

Next

Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests