How to tell if phone is being shaken

Get help using Construct 2

Post » Mon Dec 29, 2014 9:31 pm

I want to trigger an event when the player shakes their phone, but I'm not quite sure how to go about it. If it helps, I'm focused mainly on iOS.
Thanks.
Image
B
26
S
6
G
2
Posts: 38
Reputation: 2,427

Post » Mon Dec 29, 2014 10:27 pm

Read this:
yeah, i really like to say that you should "Read this:"
B
12
S
5
Posts: 138
Reputation: 1,490

Post » Tue Dec 30, 2014 4:03 am

Thanks, I'll look into that.
Image
B
26
S
6
G
2
Posts: 38
Reputation: 2,427

Post » Tue Dec 30, 2014 5:11 am

It's still not working for me... what event should I use, and what are some reasonable parameters?
Image
B
26
S
6
G
2
Posts: 38
Reputation: 2,427

Post » Tue Dec 30, 2014 5:13 am

Also, on a side note, is there a certain way to get 'vibrate' to work on iOS? I can't get that to work either.
Thanks.
Image
B
26
S
6
G
2
Posts: 38
Reputation: 2,427

Post » Tue Dec 30, 2014 3:58 pm

for shaking you need the browser plugin, there is a action called "vibrate" but i dont know if it works on ios because iam an android fanboy.

to detect shaking you must use the touch function and "compare acceleration" but i cant much help you there which parameters you should use or how to set everything up because i never try it before sry :(
Read this:
yeah, i really like to say that you should "Read this:"
B
12
S
5
Posts: 138
Reputation: 1,490

Post » Tue Dec 30, 2014 4:29 pm

Okay, I tried both of those originally, and the vibrate didn't work, and I must have just been putting the wrong parameters in for "Compare acceleration". Thanks for your help, EyeForcz.
Image
B
26
S
6
G
2
Posts: 38
Reputation: 2,427


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 15 guests