Forum rules - please read before posting.

Updating the interactions menu against a certain hotspot

When showing the interaction menu manually, all interaction buttons are enabled. This makes sense since the menu doesn't know which Hotspot it was open for. How would one (through script) update those interactions against a specific Hotspot?



  • The Menu's MatchInteractions function can be called to update its display for a given Hotspot.

  • Nice!
    I noticed that doing this also hides the cursor though (while having the menu appear "On Interaction" doesn't). It would be nice if MatchInteractions() had a bool for this.

  • The function shouldn't affect the cursor - have you tried running it in isolation, i.e. not turning the Menu on at the same time?

  • edited March 2023

    Yes, you can try it out in the latest repro I sent you:

    Hovering over the box currently shows both the menu and the cursor sprite. But if you change the menu's appear type to Manual and update TestComponent to this:

    EventManager.OnHotspotSelect += (Hotspot hotspot) =>
        if (!hotspot.IsSingleInteraction())
            interactionMenu.MatchInteractions(hotspot, false);
        this.hotspot = hotspot;

    Hovering over the box shows the menu but hides the cursor sprite.

  • The cursor doesn't turn off - it switches to the Hotspot cursor, which you have set to an invisible texture.

  • Aha, interesting.
    I was confused as switching to the hotspot cursor didn't take place before the Hotspot menu was set to manual.

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.