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
I am trying to make multiple instances of objects add to a variable. I have used the "For Each' condition but that doesn't seem to work. The image below is what I am attempting to do> Any suggestions?
Lets say you have 10 GOLD_MAKER ,you want every 1 second to add the total amount of GOLD_MAKERs to the players GOLD var?
If is that you are trying to do you can add every 1 second the "GOLD_MAKER.Count" to the players var.
Each one should add 1 to the variable. So if there are 10 of them, then I want it to add 10 per second
First of all compare 2 things "GOLD_MAKER.count => 1" then add a sub event "every 1 second" -> Add GOLD_MAKER.count to GOLD variable.
Develop games in your browser. Powerful, performant & highly capable.
It is still only adding one to the variable. For instances if there are two gold makers it should add 2 gold per second. That is what I am trying to achieve
Its working on me.
I see what I did wrong. Thank you very much for the help and I hope you have a great day!