Forum rules - please read before posting.

Change HotspotLabel position at runtime

edited November 2017 in Technical Q&A
My main inventory is at the bottom of the screen and when I move the mouse on an item the label appears above it.
But now I have entered a second menu (for Option, Save, Load ecc with Horizontal Element) set as "Mouse Over" that appears at the top of the screen. The problem is that the Hotspot Label (set as Always fit within screen) appears on the right of the items in this menu (as it can not appear above).
I would need the label to appear at this time under the cursor and not above it.
It would probably have been enough to change at runtime the Y of the Hotspot menu but I did not find how to access it.
So I made a copy of the Hotspot menu, changed the Y and checked Start game locked off.
Then in the "ActionList when turn on" of the MouseOver menu I entered Object -> Send message -> Custom -> and in the script

MenuHotspot.isLocked = true;
MenuHotspotPause.isLocked = false;

In ActionList when turn off:

MenuHotspot.isLocked = false;
MenuHotspotPause.isLocked = true;

This way I turn the two menus on / off as I need.
Is there a simpler way?


  • That would have been my first suggestion as well, but coding isn't necessary - the Menu: Change state Action can be used to control the locked state of Menus.
  • edited November 2017
    Yes, thank you, I removed the code.
    But I have an issue, the same issue that happens when I leave the inventory and I have to change the item icon.
    If I exit the menus very quickly, random the code in "Actionlist when turn off" is not executed.
    In "Actionlist when turn on" I also hide the button with which I open the inventory and when "Actionlist when turn off" is not executed, no hotspot label menus are exchanged and the hidden button is not reactivated.
    Do you have any idea why?

  • I found the reason for this behavior, it's the Fade of the Pause menu, removing it the issue seems to be fixed.
    Probably because of the fade the menu fails to change status when the cursor moves too fast above and outside it.

  • Looks like the "ActionList when turn off" will not run if the Menu hasn't faded in completely - I'll address this.
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.
Do NOT follow this link or you will be banned from the site!