Forum rules - please read before posting.

Disabling hotspots - bug?

So I want to disable hotspots while subtitles are on. The situation I want to avoid is this: while I am advancing a conversation forward by clicking while Subtitle Menu is up, if I accidentally hit another hotspot in the scene while doing that clicking, it is disorienting to the player.

I tried to approach this by using Engine: Manage Systems. I have these two ActionLists for when the Subtitle Menu turns on and off:

Here are those two ActionLists for on and off:

When I run the scene, it mostly works. Except: when I hit the final bit of dialogue in the sequence. When that happens, if my mouse happens to be hovering over a hotspot in the scene when I make that final click, it triggers that hotspot and corresponding interaction, annoyingly.

Any idea how to prevent this?

Comments

  • I recall you're relying on a custom interaction system for your game - I'll need to first know if this is an issue with AC without the use of custom scripts, or if it's a case of the custom script needing to be amended.

    If you remove your custom script and revert back to a built-in interaction method (e.g. Context Sensitive), do you still get this issue?

  • edited July 25

    Ooooh, good point. I made a brand-new Adventure Creator project to test this, using the standard interaction system. It works as intended. See how, below, I click on the tree, while keeping my mouse over the bench (another hotspot), it runs through the tree narration, and then the last click exits out of Subtitles but doesn't trigger the Bench narration until I click on it again? That is the desired functionality.

    Now, here is a snapshot of my prototype, with the custom interaction system we discussed in this thread. In it, I click on one character with a hotspot, Jack, while hovering my mouse over the other character with a hotspot, Raelyn. As I click through the narration pertaining to Jack, my final click triggers the narration for Raelyn:

    Here is my final code for the Custom Interaction System, in case it's helpful: https://ctxt.io/2/AACY3foMEQ

    Possibly relevant: since we last talked, I added new code in there to highlight hotspots relevant to the equipped skill. That highlighting works when a subtitle menu is not running, and resumed when the chat is done. Here is video of it working:

    I bring this up because it is similar functionality, and is working correctly. My final click in the sequence does not trigger the highlighting. If I could get that final click to also not-trigger subtitles relating to another hotspot, I'd be golden. But this is where I'm stuck.

    Screenshots of some relevant settings and ActionLists:

  • FYI: I had accidentally put the wrong version of my CustomInteractionSystem in the message above. It has now been edited to include the correct, latest version of that script.

  • Looking at your Update function, it looks like you're running Hotspot interactions upon releasing the mouse - is that to say that if you hold the mouse down, while skipping subtitles, the new Hotspot interaction is delayed until you release it?

    If so, you'll likely need to have the script check if the game is in "cutscene" mode at the time the mouse is first clicked down - and then ignore the "click up" if so.

    Something along the lines of:

    bool ignoreNextClickUp; // Declared above
    if (Input.GetMouseButtonDown (0))
    {
        ignoreNextClickUp = KickStarter.stateHandler.IsInCutscene ();
    }
    if (Input.GetMouseButtonUp (0) && !ignoreNextClickUp)
    {
        // Run interaction
    }
    
  • BEAUTIFUL! That did the trick! We're going into our first round of playtesting this weekend and couldn't have gotten here this quickly without your generous help. Thank you!

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.