I am working on a game where I have an object that damages based on how many enemies are inside it
when enemy objects get in range it counts how many are in good, but when enemies leave the range it’s not counting down properly, It only removes 1 no matter how many enemies it added
That ToString(PickedInstancesCount(Enemy)) code doesn’t work on a variable, the sample is exactly what I want but It needed to be able to change a variable
I did not know you don’t know when to use ToString()
Look below you will see two number 5
5
You can totally tell its 5 in both cases and you can totally tell both are numbers
But are they?
Try to select them each by each
And you will find out top one is actual text you can copy and paste into other text field
Where bottom one is actually an image
In gdevelop there is same story you have numbers on which you can do math
And text which you can copy and paste like other text
Text when you want to display number require ToString()
In below example i am not trying to display number but a VARIABLE
That is why i do not need in text object ToString()
But if i would want to make math on multiple variables
For example FailVariable/OtherVariable
Now i need ToString(FailVariable/OtherVariable)
To display it in text object