Topic was automatically imported from the old Question2Answer platform.
Asked By
Maciu01
i am trying to make a text adventure game. When you’ll type certain words story will go forward , example if i type “go left” character will go left, but i also want the same thing to happen if i’ll write “move left”.
my code:
func _on_text_text_entered(new_text):
if new_text == "walk left" or "Go left":
$Background/Player_box/Text_/test.visible = true
$Background/Player_box/Text_/nothing_happens.visible = false
if new_text != "walk left" or "Go left":
emit_signal("wrong_password")
$Background/Player_box/Text_/nothing_happens.visible = true
$Background/Player_box/Text_/test.visible = false