Forum rules - please read before posting.

Change Hotspot Double Clicking Via Action

edited June 2020 in Technical Q&A

Dear Chris and everybody,
I'd like to change my Hotspot Double Click via action.
Basically I've all my "way out" hotspots to change scene with the double click set to "Triggers Interaction Instantly".
So it's faster and the player is teleported there, rather to wait all the walking...
This of course is deactivate to those hotspots that have a trigger. For instance: there's a big robot guarding a door, therefore there's a trigger that "push the player back" and doesn't allow you to go to another room. And therefor the "instant double click" is set to "nothing" to avoid skipping the puzzle just by double clicking the door...
But once I've got rid of the robot guarding the door (and its trigger), I would like to change my Hotspot double-click from "Does Nothing" to "Triggers Interaction Instantly" (so it works like the other hotspots I've on my game to change scene).
Can I do that through Action List? I couldn't find a way... Or should I write a custom script to attach to my hotspot and then in the action list choose "object - send message" to trigger the function in the script to activate the double click feature?
If it's the second case, what's the script for that? And is it persistent? The "Remember Hotspot" will remember also the double-clicking option?

Hope I was explaining myself clear enough!
Thanks a lot!

Comments

  • The property you're looking to affect is the Hotspot's doubleClickingHotspot field.

    You could indeed wrap this around a function and trigger it with the Object: Send message or Object: Call event Action:

    public void UpdateDoubleClick ()
    {
        GetComponent<Hotspot>().doubleClickingHotspot = DoubleClickingHotspot.TriggersInteractionInstantly;
    }
    

    But this change won't be accounted for by the Remember Hotspot component.

    It is possible to incorporate this in a custom Remember component - and this could be merged with the same script that holds the above function.

    However, it may just be easier to duplicate the Hotspot, give it a different double-click mode, and swap the two around.

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.