GameSalad

Keeping Actor in a linear movement

Hi Everyone!
I am new to all of this and have managed to figure out how to make everything work by watching youtube channels.
BUT I can not find how to move an actor up and down with touch and drag! Also to only keep this actor on the edge of the screen. Who ever has the time to help, please do! I am desperate. I had it down by using keys but realized that in order for my game to work on iOS and android i had to change the way i was moving my actors. so pleeaaaassseeee somebody....anybody.. HELP!! thank you:)

Comments

  • SocksSocks London, UK.Posts: 12,725Member

    When touch is pressed
    --Constrain self.postion.Y to mouse.position.Y

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

    To keep the actor on the edge of the screen, place the actor there. If you only constrain the Y position (as @Socks suggested) and do nothing to the X position, the actor will stay there.

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

  • eblancaslopezeblancaslopez Posts: 3Member, PRO

    Thank you so much! Ill try that @tatiang and @Socks !! I really appreciate it!

Sign In or Register to comment.