Hi! Sorry if this is a silly question, I'm very new to AC and game development in general! I was wondering, since there's an option to trigger the "Examine" of an item by dragging and dropping it onto itself, can something similar be done but with dropping it onto a specific hotspot (I was thinking the player's), instead? As in, every time an item is dragged onto the player, no matter which item it is, its Examine interaction is activated?
Technically, there's the workaround of not using the Examine interactions at all and just assigning each inventory item an interaction through the player's hotspot component, but if I do that, it seems I'll have to copy-paste this set of interactions into each scene I make... Not ideal for the long-term; and I haven't really been able to come up with anything better than that. But, of course, my knowledge is really limited haha.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Welcome to the community, @Plushie.
You can do this with a short script attached to the Player's Hotspot:
Paste that in a C# script named ExamineItemHotspot, and place on your Player's Hotspot. The Hotspot will need to have an "Unhandled inventory interaction" defined, but left empty - this script will react when it's run and do the rest.
Even without the script, this wouldn't be necessary. The Player character can be made a prefab that is spawned into each scene automatically. If you set the Player Hotspot's Interaction Source to Asset File, you could then assign each of the original item Examine ActionList assets into the Hotspot Inspector, avoiding the need to create duplicates.
@ChrisIceBox Hi, thank you so much for your reply! :} Works perfectly. I'll keep the rest of your advice in mind, as well.