Yeah, I know there are red gems and eye sockets. Just that by default you can only insert blue gems into the sockets. But I should be able to use these new sockets then for red gems (and as template as well I guess). I guess they'll work just like the default eyesockets: they will activate on the insertion of a red gem and can have connectors etc right?
Thanks for the tostring tip! It makes testing SO MUCH easier!
Also, I just realized that this trapped, onpickup item may be the kind of thing I need for an other puzzle I have put away and forgot. But I would like to understand it a bit better.
Can I use it to call a function that has been defined in a script entity inside the mod? Or do I need to script it all in the asset definition?
I want to make a trapped room. When the treasure is picked up, the room (gradually) fills with poison gas and the party must escape quickly through a hidden exit.
Though it is not a whole bunch of code, it would be more convenient to be able to adjust the trap itself from inside the editor instead of having to close the project, open the .lua file, save it, reopen project etc. Also I'm not sure what this hook is capable of and what it can't do. Can it for example be used to close a specific door?
Btw, when does the onEquip hook trigger? Only if the item is put into a hand or even if into the inventory? And how many times does it trigger?