Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
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 want to make a simple inventory system:
I know array will do the job, but it would be so helpful if someone can give me a hint:)
Go check out the Arrays for beginners tutorial , making this wouldn't be too hard , you just need to check if there is a 0 in the array and remplace the zero by the ID of an item in a for every elements loop ...
I'll make you an example when I get home
Thanks Whiteclaws! Won't the loop replace every cell of 0? but I'm looking forward to your example:)
Develop games in your browser. Powerful, performant & highly capable.
There's where a variable enters , the loop will only be triggered if a variable is equal to 0 , and the variable will turn 1 when the item is added successfully !
Here We Go !
P.S: That's the first time I do something like this :) . Arrays , I'm starting to love-em !
Wouldn't a simple "Trigger once while true" prevent it from changing every instance?
Well , Yes , but I just wanted to show that the usage of variable with arrays is possible
(Screw this , I completely forgot the "Trigger once while true" :P )
Thanks for the example and hint!