How do I use the joystick NOT for player movement?

Get help using Construct 2

Post » Sun Jun 07, 2015 9:24 pm

I am making a music game. I want to use the joystick to play different sounds, and not for player movement. So, for example:

if you press the joystick down it plays sound #1,
if you press the joystick down/right it plays sound #2,
if you press the joystick right it plays sound #3,
if you press the joystick right/up it plays sound #4,
if you press the joystick up it plays sound #5,
etc.. all the way around the joystick dial.

I know there is the 8 way movement with the joystick, so I believe this is possible. Any ideas on how to make this happen? Thank you very much
B
12
S
2
Posts: 42
Reputation: 734

Post » Sun Jun 07, 2015 9:44 pm

Gamepad manual
What you want is to react to the Axis conditions.
When the axis are in a certain range, have a certain action, in your case likely an Audio - play action.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
289
S
112
G
94
Posts: 7,333
Reputation: 69,293

Post » Mon Jun 08, 2015 2:58 am

Thanks man, works great.

It's playing the audio every tick. Like if I hold the joystick to the right it plays the sound over and over really quickly until I let it go. How would I make so that if I hold the joystick to the right it plays the sound only once?
B
12
S
2
Posts: 42
Reputation: 734

Post » Mon Jun 08, 2015 3:01 am

Trigger once whilst true.
B
59
S
21
G
9
Posts: 641
Reputation: 9,787

Post » Mon Jun 08, 2015 3:13 am

Bless your soul Elliott, my guardian game angel. It works perfectly
B
12
S
2
Posts: 42
Reputation: 734

Post » Mon Jun 08, 2015 6:43 pm

(removed as talking nonsense ;-) )
My tutorial through development blog is at http://myconstruct2dev.blogspot.co.uk/
B
12
S
3
Posts: 221
Reputation: 1,328


Return to How do I....?

Who is online

Users browsing this forum: Lancifer, MPPlantOfficial and 63 guests