I’m not sure how the player is interacting with the arrows or when you want them added to their inventory or counter.
It could be the condition it’s looking for or comparing the text to “ARROWS +” Is that the exact text or is there a number after the +? You could try moving the action or changing the condition. You could change the equals to begins with or contains. But there might be a different way to trigger the adding. Also, make sure it can only add it once.
I had to rework this. It’s actually a little simpler. I had to switch the ammo variable from an array to a structure to make it easier to add and get the quantity. If it remained an array, you’d have to use a number to choose the array child but with a structure, you can use the ammo name. So, things had to be done differently. Several changes. I removed the variable i and the repeat and replaced it with a for each child
My test project: To test my concept, I added a crate anywhere the scene is left clicked.
Happy New Year @Keith_1357 and thanks for sharing!
I followed your suggestions and everything works just one last question I would need to transfer the variable “ammo.HANDGUN.Quantity” in the variable “save.ammopistola”.
all variables “save.” in my project they are saved at the end of the level and reloaded in the next scene
I deleted the saveammopisto etc. variables and used the ammo.handgun.quantity variables, created a new save file and reloaded at the start of the next scene.
It seems fine now!