How can I get a certain digit, say a, from a number, say b? I used to program often in python, and in python there's expression, "string"[1], which returns the first letter of the string. However, I can't find that in Construct 2.
Develop games in your browser. Powerful, performant & highly capable.
to get W in Woodland use action
--------------------------------> left(Woodland,1)
say as "string"[1]
variable = "Woodland"
variable[1] python
--------------------------> system set A to left(variable,1) construct 2
I'm not sure what I'm doing wrong, but for some reason I'm getting absurd numbers when I run this code:
subtract from CurrentAnswer
int(right(str(CurrentAnswer),2))
What the code should do is get rid of the number on the far right, help please?
Substract
12345-5=12340
12340-0=12340
etc
Set
12345
1234
123
Sometimes, programming can make you feel very stupid. This is one of those times. Thanks so much!