Forum rules - please read before posting.

Get Running Hotspot in custom action

edited March 2021 in Technical Q&A

I use a custom action that runs when an inventory items dropped on hotspots with creating an interaction in "Unhandled inventory interaction" for some hotspots. now the question is how I can get the Hotspot that run the unhandled inventory interaction in custom action script?
I want to know which hotspot the player dropped the inventory item on and called this action.

Comments

  • The standard way is to use a GameObject parameter that sets itself to the Hotspot when run.

    Create a new GameObject parameter in the Interaction, and attach the Set Interaction Parameters component to the Hotspot, assigning the Hotspot to this GameObject value.

    If you're using a custom Action, you'll also have to update your Action to accept parameters. A tutorial on this process can be found here.

  • yes I was missing the component part. now it's working. thank you very much Chris

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.