Forum rules - please read before posting.

Button: Reveal hotspots

Hi all!

I thought I had something figured out for my mobile game but it turns out that wasn't the case.
So, I created a menu button to reveal hotspots. It triggers an actionlist which temporarily shifts the alpha on a "Clues" object and children, which contains little transparent Xs in each and every hotspot on the scene. It does this sending a message received by a "Fader" script attached to the Clues object (so that the Xs fade out). This worked for me as I Was working in my first scene, and I could place the Xs as regular game objects instead of the hassle of trying to approach it via UI. My problem is now I need that functionality for other scenes and I realize I didn't think this through properly, since the actionlist triggered by the menu button will always refer to a constant ID for my object in scene 1.
Am I coming at it from a wrong place? What would be a good approach to this? Any ideas will help!

Thanks in advance!

Comments

  • Invoking an Input button named "FlashHotspots" will cause all Hotspot-linked Highlight components to flash. You can use the Settings Manager to tweak this behaviour, e.g. having Hotspot icons show as well.

    On mobile, you can create a Button element inside a Menu, and set its Click type to Simulate Input so that the "FlashHotspots" input is invoked when pressed.

  • Oh! Didn't know about that one. Worked like a charm. Thanks!

  • Sorry, but how do you do this?

  • So far, I managed to create a button that simulates input, but i can't get it to actually do it. I made a video with the problem:

  • edited July 2023

    Ok, Figures it out. Simulate was not supposed to be "Axis" but "Button".
    Yet, while this worked for Menu, it doesn't work for FlashHotspots. I don't know why. My input Manager is a copy of Menu:

    And pressing space makes the FlashHotspots work. But the simulated input does nothing.

  • Looks OK - and I can't recreate such an issue on my end.

    What are the properties of the Menu this is in, and does it work if you temporarily switch the Menu's Source to Adventure Creator?

    If you're looking to have the Hotspots be highlighted for the whole time the button is pressed, you'll need this script on the AC wiki:

    https://adventure-creator.fandom.com/wiki/Hold_input_to_flash_Hotspots

  • I What are the properties of the Menu this is in, and does it work if you temporarily switch the Menu's Source to Adventure Creator?

    I tried creating a new menu with Source to Adventure Creator and I have the same behavior. Running version is l.77.4

  • Are any custom scripts involved, such as the one I linked to above?

    Thank you for the details - but I still can't recreate it on my end copying your settings.

    If you can PM me your 8 Manager assets, your NewInventoryUI canvas prefab, and a sample scene as a .unitypackage, I'll take a look directly.

  • If you can PM me your 8 Manager assets, your NewInventoryUI canvas prefab, and a sample scene as a .unitypackage, I'll take a look directly.

    I don't know how to do that. (still learning as I go).

    But, Isn't there a way to call FlashHotspots not from the input manager, but with an Action List instead (or a c# script)?

  • Got it. There was an Active Input also called FlashHotspots. The simulate input was calling that instead of the input manager (or I guess, first). Deleting that fixed the problem.

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.