Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Eidam |
Hello,
I need help: How I define any number in code?
For example:
if var a == (any number):
do something
Thanks
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Eidam |
Hello,
I need help: How I define any number in code?
For example:
if var a == (any number):
do something
Thanks
Reply From: | A112Studio |
Here’s your answer https://forum.godotengine.org/2984/how-to-check-if-a-var-is-an-object-or-a-number
Hello,
thank for answer, but I don´t understand to answer. You answer does not help with my problem…I wrote question wrong, hereI give more detailed question
I need something as this:
$"Button+some_number".something
Or with var
var a = some_number
get_node(str("Node2D/Button", a)).something
Eidam | 2020-05-10 17:35
Try using “Node2D/Button”+str(number)
A112Studio | 2020-05-10 18:06