playMaker

Author Topic: 'device shaking' and 'device stopped shaking'  (Read 3993 times)

VectorF22

  • Junior Playmaker
  • **
  • Posts: 50
'device shaking' and 'device stopped shaking'
« on: July 21, 2013, 06:50:03 PM »
Hi,

I'm working on an android game and while the 'device shake event' is great, it's only good for 'one shot' events. I could really do with an action that detects the device is still shaking and to also detect when it's stopped.

Thanks!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: 'device shaking' and 'device stopped shaking'
« Reply #1 on: July 28, 2013, 10:43:48 AM »
Hi,

 can you test this action I attached? it works the same way as DeviceShakeEvent only that is fires the event when it's under the value. so when DeviceShakeEvent fires the event, have DeviceStillEvent on the next state to watch for when the device will be still again.

 If that works for you, I'll add it to the shared action section.

bye,

 Jean

VectorF22

  • Junior Playmaker
  • **
  • Posts: 50
Re: 'device shaking' and 'device stopped shaking'
« Reply #2 on: August 02, 2013, 06:02:56 PM »
Hey Jean,

I've tested it and it doesn't seem to be working... I have it rigged up so that it plays a looping itween in the 'shaking' state . The 'device still event' action is also on the shaking state, but it doesn't fire it back to the first state when the device stops shaking.

Thanks.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: 'device shaking' and 'device stopped shaking'
« Reply #3 on: August 05, 2013, 03:25:23 AM »
HI,

 you need to states for this to work: one that test that shaking started, and you move to the second state that watch for when the shaking pass below a certain threshold.

Have you tried like that?

bye,

 Jean

VectorF22

  • Junior Playmaker
  • **
  • Posts: 50
Re: 'device shaking' and 'device stopped shaking'
« Reply #4 on: August 06, 2013, 06:50:21 PM »
Hey Jean,

Yeah that's exactly how I had it set up...

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: 'device shaking' and 'device stopped shaking'
« Reply #5 on: August 08, 2013, 03:09:19 AM »
Hi,

 bump me next week ok? I'll do a working sample. but I don't have the time right now.

bye,

 Jean