I'm using prefab'd item collectors as 'chests' - mostly so I can have a little more control over how collections/completionism/etc. is handled - that, when used and their items collected, run some code. At the moment, however, I'm having trouble seeing why these events aren't running when the collector is interacted with. In the Item Collector component I have ORK Game Events in both the 'Start Game Event' and 'End Game Event' fields which (at the moment) do nothing but call some print functions from another attached component. No outputs are coming through the console even though the items are being collected and the collector objects are being destroyed. I don't have the 'spawn prefab' and 'use spawn prefab' boxes checked (as the object being used is a 'chest' rather than the contained object itself) and the component listed in the 'Call Function' event node is correct but it still looks like nothing's getting called.
EDIT: I hadn't read one of the info boxes carefully enough - in the collector's Game Event section it specifically says the player is used as the starting object, the collector/drop as the "event object". I changed the events' Actors sections to point to 'event object' like I should have and everything works just fine.
Unless your item collector's collection type is set to Box, they're most likely set up to use scene IDs. The scene ID is used to determine if an item was already collected or not.
If you use a prefab, you need to set each of them in your scene view to use a different scene ID (e.g. via the Reset All IDs button in the inspector), otherwise the collectors sharing the same scene ID will only allow one of them to be collected.
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
It did in fact come down to an error on my part -.- I hadn't read one of the info boxes carefully enough - in the collector's Game Event section it specifically says the player is used as the starting object, the collector/drop as the "event object". I changed the events' Actors sections to point to 'event object' like I should have and everything works just fine.
Thank you very much for your testing and patience, I apologise for wasting your time.
If you use a prefab, you need to set each of them in your scene view to use a different scene ID (e.g. via the Reset All IDs button in the inspector), otherwise the collectors sharing the same scene ID will only allow one of them to be collected.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I hadn't read one of the info boxes carefully enough - in the collector's Game Event section it specifically says the player is used as the starting object, the collector/drop as the "event object". I changed the events' Actors sections to point to 'event object' like I should have and everything works just fine.
Thank you very much for your testing and patience, I apologise for wasting your time.