How to use one button for more than one thing?
Hello
I tried the following for a menu:
User clicks on button
+alterable value a of button = 0
-> Create theobject at thecoordinates
-> set alterable value a of button to 1
User clicks on button
+alterable value a of button = 1
-> Destroy theobject
-> set alterable value a of button to 0
This is not working. because it somehow sets the alterable value so fast that the object gets destroyed right away. Any workaround?
Doesn't work with pressing a certain key either.
Also how do i prevent that if i have two clickable objects overlapping each other that both get clicked instead of the top one only?