Don’t you hate it when you have perfect looking code, and yet it DOESN’T WORK FOR ANY REASON WHATSOEVER! *grrrrr* I built the inventory system in js, and had all the information heading to the debug console ( Debug.Log ( “whatever” ) ). But for some reason, I wasn’t getting the values I was expecting, after much commenting of code, and poking of things, I still had no idea what was happening. All events were triggering once. The idea being that every time the Mole hit an object, it grabbed the name of the object, stuck it into the Mole’s inventory. Sounds simple enough?
But for no reason I could see my code was failing. I could hit each ore type once, and then after that, nothing was put into the debug screen.
Then, I discovered the collapse button on the console. It was turned on. I didn’t know what it did, so clicked it. That fixed the problem. My code *WAS* running fine. But the console was removing duplicate events. ARGH!!!! But oh well, its turned off, and I have an inventory and score system in game.
It is pretty basic at the moment ( as the video will show ), but suddenly – I actually do have a game 🙂 Yay! Well worth the large amount of frustration from that bleeding collapse button!
YouTube vid :
lamentconfig