GameSalad

Flip Actor by Touch

DaddyMagicDaddyMagic Posts: 23Member, PRO
edited July 3 in Help Wanted

*UPDATE: finally got this working myself, below is the correct rules in case anyone else needs this.

I'm trying to flip an actor based on which side of the actor you touch. I know how to do this by using keyboard input but if using Touch input I can't seem to get this going. I'm using:

RULE
if self.motion.linearVelocityX < 0
DO
CHANGE ATTRIBUTE
self.graphics.flipHorizontally TO true
ELSE
CHANGE ATTRIBUTE
self.graphics.flip horizontally TO false

Comments

  • tatiangtatiang Posts: 10,916Member, Sous Chef, PRO, Senior Sous-Chef

    Here's a demo. I made it on a Mac so you may have to Google convert mac to windows gamesalad to open it.

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

  • DaddyMagicDaddyMagic Posts: 23Member, PRO
    edited July 3

    Thank tatiang, I must have figured this out while you were also working on this. I've checked your version out and it does what I need also. I've noticed the Mac files have been opening just fine here on Windows GS. Hope others can find this useful, Thanks again!

  • tatiangtatiang Posts: 10,916Member, Sous Chef, PRO, Senior Sous-Chef

    You're welcome! Glad you got it working.

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

Sign In or Register to comment.