dual stick problem

Get help using Construct 2

Post » Wed Feb 26, 2014 3:56 am

I'm new to this program, so I have been reading tutorials, watching videos, etc.. as I have been working on a basic top down shooter to get my feet wet. I have an image sprite that I can move around with my left analog stick, and rotate with my right analog stick, and fire bullets with my right trigger. My problem is that when I release the right analog stick, my sprite automatically rotates back to its starting angle instead of staying at it's last angle. I've used the angle(0,0,Gamepad.Axis(0,2),Gamepad.Axis(0,3)) to allow it to rotate and keep it at the position it is at as long as my analog stick. Is there a way to make the sprite not automatically rotate back to it's original angle?

Thanks for any help, and for patience with what are probably silly questions.
B
2
Posts: 3
Reputation: 156

Post » Wed Feb 26, 2014 9:29 am

@newbie99

Hey mate, not sure how your events are structured but I'll hazard a guess you have it on an "Every Tick > Set Angle to: angle(0,0,Gamepad.Axis(0,2),Gamepad.Axis(0,3))" kind of thing?

As long as you don't care to much about deadzones.. you could Try using "Compare Axis" instead, if "Right Analog X" is "not equal to" to 0 then > set angle to...

hope it helps
B
9
S
2
Posts: 26
Reputation: 586

Post » Sun Mar 02, 2014 3:33 pm

I tried using hte Compare Axis, and I'm still having it return back to it's original point. It's not a huge deal, but I'll keep playing with it to see if I can get it working right.
B
2
Posts: 3
Reputation: 156

Post » Mon Mar 03, 2014 12:28 am

I can take a look at your code for you if like if you want to upload/attach it?
B
9
S
2
Posts: 26
Reputation: 586

Post » Sun Apr 13, 2014 7:34 pm

I'm new to this program also and had the same problem. I did it this way.

gamepad.jpg


Seems to work.
You do not have the required permissions to view the files attached to this post.
B
7
Posts: 11
Reputation: 519


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests