Hello, i have a problem.
I made an object that should kinda work like a container; what i mean is, if you drop an object representing a log of wood in my game, it should:
a) add 1 to object variable informing on how much wooden logs is stored in there
b) destroy the log that has been “put” in the container
and after clicking on it, it should:
a1) spawn a log
b1) subtract one from the object variable that is counting logs
c1) repeat the process listed in a1 and b1 “stored logs variable” times
and on original instance of an object it works as intended, but when i try to use another instance of this object to store logs it reacts in two diffrient ways:
a) if og container is empty, you can throw logs onto the instance, and it will count them, but you can not take them back from the container
b) if og container has at least one log, when trying to take logs out of the instance of container, it will spawn stream of logs, that is not ending. also it does not subtract any instance value to my knowlage ( i checked that using debugger)
here are the screenshots, pls help: