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 think one issue was that you were resetting on delete to a valid slot id (0). I've changed it to start at -1 to indicate empty, and added a function that searches the array for the first empty slot.
Oh so that would explain the weird behavior ( if creating first item and then deleting would send me at the end of the array ) among other things.
is it -1 similar to when you write array.Width - 1?
— & blackhornet thank you guys!!!
Develop games in your browser. Powerful, performant & highly capable.
Width-1: no, this is something else. It's a common mistake. Indexes start a 0, so you have to count that as "1" when looping. That is, if the array is 8 wide, you don't want to loop from 0 to 8, you want to loop from 0 to 7!
ahhh damn... rookie mistake! Thanks for your help and the info. :)