How to make character move by tapping
jtohahn@gmail.com
Member, PRO Posts: 11
How could i make it so my character will move left when i touch the left side of the screen and right when i touch the right side of the screen?
Comments
When mouse button is down
-- When mouse position X < [half the width of your scene]
----Move Left
--Otherwise
----Move Right
when the mouse button is down AND the mouse position X<half? @Socks
Is this a question ? If it is it's not clear (to me at least) what the question is.
can you send me a screenshot of what this looks like? And i only have if mouse is over actor for mouse position.
Mouse position is an attribute. In a rule you'll see a drop down menu select attribute open the ... Button and select device.mouse.positionX. You should really watch some of the starting in gamesalad videos on the gamesalad academy.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
@Lost_Oasis_Games still doesnt help. i dont see a drop down menu
Not got GS at the moment unfortunately.
Can you post a screen shot of this.
can someone post a screenshot of how to do this?
EDIT: nvm
how can i tell what half the width of the scene is
You are only showing a tiny zoomed-in section of your rule, could we see the whole rule.
You could also use large invisible buttons over each half of the screen if that is easier to understand. I have a button control tutorial below if you want to check it out. In this tutorial I use arrows as buttons, in your case you'd use just an actor with its alpha set to 0 so it is invisible.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
@jamie_c that is exactly what i need. using mouse positions messed up some other features in my game
@jtohahn@gmail.com, awesome! Glad it works for you!
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page