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
Im using an array to track level completions with simple 1s and 0s. Im wondering if there is an easy way to get the sum of a row in this array to quickly be able to display how many levels have been completed. If I could get the sum of the row they are stored on in this array that would give me my number- but if there is not a way to do this I can try something else-
Thanks in advance.
Develop games in your browser. Powerful, performant & highly capable.
Yes you can do this, for example if 0 and 1 are stored at X only i.e. 1,0 2,0 3,0 4,0 then the logic is :
for from 0 to array.width, add array.at(loopindex,0) to variable
At the end of the loop the variable is the total of all values at X.