Gravity and Shake Mechanic Issues

Hi. I'm trying to make a simple labyrinth-style game and am having some trouble with the 'shake' mechanic.

Here's what I'm trying to do: the ball (the player) freely rolls around on the scene. The Gravity Ball will pull the player toward it once the player is close enough to the Gravity Ball. The player can then rotate around the Gravity Ball (using the accelerometer as the controller), but cannot escape its gravity UNLESS the player shakes the mobile device, "freeing" them from the gravity.

As per TShirtBooth's videos, I've managed to figure out the Gravity Ball's, well, gravity. I've followed the Cookbook's tutorials on the Shake mechanic, but I'm having a lot of trouble tying the two together. I have experience in coding but wrapping my head around the Rules in GameSalad is giving me a headache.

What I like to do before I code is write out what I want to do in basic english. So, essentially, I'm trying to do this:

if player is touching gravity ball, then player cannot escape without shaking device
if player shakes device, release player from gravity ball for x seconds.

Any help would be greatly appreciated, and apologies in advance for not making much sense.

Comments

  • aduroanimusaduroanimus Member Posts: 5
    I'm still having trouble with defining this mechanic. If anyone has an idea that they can toss me, I'd really appreciate it. Thanks.
Sign In or Register to comment.