I wanted to know the way to use textbox and mathematical operations.
Input value (in textbox)?
==> SetText (textbox value + 2)
It's pretty simple, but I can not find how to transcribe this with construct 2 code.
Thank you for your help.
Develop games in your browser. Powerful, performant & highly capable.
Set textbox text to str(float(textbox.text)+2)
if you work with whole numbers numbers, int works as well ofc
I tried, but it does not work, or I do not put the correct syntax.
Would you an example .Capx ?
Well, I think I found the solution :
But I'm facing a small problem again ...
I would make sure that the value entered in text box can be detected and what is more, to say that if it is different or equal to a threshold, then the value is 0.
You see what I mean?
If anyone can help me on the file, making such corrections.