Forum rules - please read before posting.

Disable an interaction element from all hotspots


Is there a way to disable one interaction element from all hotspots?
Something like the Action Engine: Manage systems Interactions: Disabled but only for one interaction?
E.g. I have 3 interactions "Use", "Talk", "Look" and at some point I would like to disable "Use" interaction (like if the character lost his hand).

Can I script that for each hotspot a specific interaction is disabled?

    foreach (Hotspot hotspot in KickStarter.stateHandler.Hotspots)
        // hotspot.HideInteractionMenu(Use); // Something like that?

Thank you.



  • Yes - you can call the Hotspot script's GetUseButton function, passing in the ID of the interaction you wish to disable. This returns a Button class, in which you can set the value of its isDisabled property to disable it.

    For example, if the "Use" icon has an ID of 0 (as shown in the Cursor Manager):

    foreach (Hotspot hotspot in KickStarter.stateHandler.Hotspots)
        AC.Button button = hotspot.GetUseButton (0);
        if (button != null)
            button.isDisabled = true;
  • Great, thanks :)

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.