GameSalad

Accelerameter speed or stop

Rogue AnvilRogue Anvil Posts: 26Member, PRO

I have a project where I need to manually stop the accelerameter at certain points (ie. when an actor is destroyed).
Can I force the accelerameter speed to 0 or simply stop the accelerameter somehow?

Comments

  • tatiangtatiang Posts: 11,293Member, Sous Chef, PRO, Senior Sous-Chef

    No. I'd recommend using a boolean or integer attribute as a flag for when to use the accelerometer value. Something like this:

    Change attribute game.trackAccelerometer to 1
    When [actor is destroyed]
         Change attribute game.trackAccelerometer to 0
    When attribute game.trackAccelerometer is 1
         Constrain [position/rotation/etc.] to [accelerometer attribute]
    Otherwise
         Change attribute [position/rotation/etc.] to 0

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.