InputEventScreen don't work.

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

This is my code.
func _input(event): var Event = make_input_local(event) if Event == InputEventScreenTouch or Event: if Event.pressed: print("BLA BLA BLA")

I make a simple mobile game before. But now i can’t solve this.
Never prints the words.

Can you help me?

:bust_in_silhouette: Reply From: kidscancode

This is not how you process inputs. Use is for testing event type. For a touch (not a release), you want the event and pressed to be true. Example:

func _input(event):
    if event is InputEventScreenTouch and event.pressed:
        print("Screen was pressed")

I recommend you read this: