Forum rules - please read before posting.

Changing interaction via script


I am having some difficulty scripting hotspot interactions. Basically I would like to disable an inventory interaction on a hotspot and enable the use interaction but do so in a script.. How would I go about this? I have made a number of attempts but am having little success. Any assistance would be greatly appreciated.


  • The Hotspot: Change interaction Action does this, so you can look inside its script (ActionInteraction.cs) for a practical example.

    The Hotspot script stores its "Use" interactions in useButtons, and "Inventory" ones in invButtons.  These are lists of the Button class, whose enabled state is stored in the isDisabled bool variable.

    You can iterate through each element on the List to find the necessary interaction.  In useButtons, read each Button's iconID value (the interaction icon ID number); in invButtons, read the invID value (the inventory item ID number).  I'll see about adding some functions to Hotspot.cs to aid with this in the next update.
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.