Android TouchScreenButton for player movement

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By RudyTheNinja

I feel like I’m close, but no matter what I change I can’t get the button to move my character
It only moves the player a little bit when first pressed, so I would need to spam the left button to move left

func _on_LeftButton_pressed():
  motion.x = max(motion.x-ACCEL, -MAX_SPEED)
  $Sprite.flip_h = true

I’m very new to Godot and game making in general
I could skip trying to get it to work on android, but I kinda got the want to just make a platform runner, so why not
I just need to be able to move my player so here I am :shrug:

In the Inspector of TouchScreenButtons there is the choice :Action

For the left moving, in Action frame type: ui_left .

For the right moving, in Action frame type: ui_right .

Nick888 | 2019-07-05 09:37

:bust_in_silhouette: Reply From: Ogeeice

Watch this might be useful

I was nooo where close!

Worst of all, it was soooo simple! I just needed to set up the action in properties to ui_right/left/up

I searched all over the place

This guy has an opacity option
Has this been moved/removed in newer versions of Godot?

RudyTheNinja | 2019-07-05 17:33

Dunno I have not done any thing requiring it before

Ogeeice | 2019-07-05 22:00