Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
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.
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
Develop games in your browser. Powerful, performant & highly capable.
Sometimes, programming can make you feel very stupid. This is one of those times. Thanks so much!