I saw from the examples how to make movement controls using the keyboard, but how do we let the user use their finger to control movement? Can I get an example? Thanks.
You'll need to describe the type of finger movement and actor movement you're interested in. There are so many possible ways to implement this that it's hard to know what you're looking for.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
I have an actor on the left side of the horizontal screen which will be firing bullets to the right.... The actor is constrained in its x coordinate, but the user needs to be able to move him up and down using their thumb... Hope this is clear.
The easiest way is to constrain the Actor's Y position to the Y position of the Touch1.Y Position attribute (Located in Device Tab).
This will make the actor always be the same Y position as the touch.
You can create a Real Attribute for the actor. Call it Y POS.
Lets Create another Real Attribute and call it Y Touch
Add a rule to the actor.
When Touch.Count /= 0
Change Self.Y POS attribute to the actor's current Y position Attribute. (Using the Change Attribute behaviour)
Change Self.Y Touch attribute to Touch1.Y Position attribute (Located in Device Tab).(Using the Change Attirbute behaviour)
Constrain the Actors Y position to the following: Self.Y POS +(Touch1.Y Position - Self.Y Touch)
This will only move the actor up or down relative to the distance that the player moves their finger.
Hope they help get you started!
GSLearn.com | Templates | Free Demos | Udemy Course