system
1
|
|
|
|
Attention |
Topic was automatically imported from the old Question2Answer platform. |
|
Asked By |
MakLinux |
Hallo
I have 2 buttons and wait if both are pressed.
yield(_on_Button1_pressed)
yield(_on_Button2_pressed)
But if the user turns the order when pressing?
How can I query both variants?
system
2
|
|
|
|
Reply From: |
TyTYctA |
I can try this
func my_func():
yield(button_func(), "completed")
print("All buttons were pressed, hurray!")
func button_func():
yield($Button0, "pressed")
yield($Button1, "pressed")
for more detail at Coroutines & signals
func button_func():
yield($Button0, "pressed")
yield($Button1, "pressed")
Gives : Unexpected ident.
That’s why my question.
MakLinux | 2019-03-15 21:24
this error happen because there are some spaces before yeild, they are not tabs.
you need to replace all spaces before yeild to tabs
TyTYctA | 2019-03-16 00:46