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
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
i'm loading a csv-file of xy-coordinates into a ListBox object to use a 'For each line' loop to spawn sprites at the specified positions. but ListBox.LineData() appears to return strings - or i suspect it to, because the results are always interpreted as 0 (zero) in the coordinate fields of the 'Create' action.
is there a counterpart to str(value) that can turn strings into values?
thanks for your time!
off topic, but what is LineData supposed to return?
LineData only returns something if you set data for the line (using the Set Line Data action); this is useful for storing extra data on lines other than text. In this case you'll want to use LineText, which is automatically converted to an integer by the parser.
In all of Construct, passing a string to a number parameter automatically converts it, so you can pass either "500" or 500, it doesn't matter. As Rich pointed out, LineData does not give the text, LineText does
Develop games in your browser. Powerful, performant & highly capable.
Nice and Nice!
I was actually adding a private variable to my text boxes to store additional information. I guess I didn't have to.