Hiding the FloatingHotspot label during conversations [SOLVED]

Started by Carles, Thu 18/04/2024 09:21:59

Previous topic - Next topic

Carles

Hi. I am using the TwoClickHandler template and the FloatingHotspot module.

While the characters are talking (Sierra type) the cursor disappears but you still see the FloatingHotspot label when you move the cursor over a hotspot. This is what I want to remove. Initially I had added this in repeatedly_execute_always:
Code: ags
if(mouse.Visible==false) {
   lblAction.Visible=false;
  }
  else {
  lblAction.Visible=true;
  }
But it didn't even fall under this condition. Then I replaced it with this:
Code: ags
if(player.Speaking==true) { 
  FloatingHotspot.SetVerticalOffset(1000);
  }
  else {
  FloatingHotspot.SetVerticalOffset(-5);
  }
This way I do get the desired effect, but I'm sure there is a more correct way to do it.
The FloatingHotspot label should also disappear when there is a blocking action and the cursor is not visible.
Could you give me a hand? Thanks.


Carles

It works perfectly, thank you! In the end I have done this:
Code: ags
if(IsInterfaceEnabled() == false) {
  FloatingHotspot.SetVerticalOffset(1000);
  }
  else {
  FloatingHotspot.SetVerticalOffset(-5);
  }

Carles

Ok. No, it was not in the module. (I think a previous post has been deleted).

Crimson Wizard

Quote from: Carles on Thu 18/04/2024 09:57:55Ok. No, it was not in the module. (I think a previous post has been deleted).

Sorry, I deleted it quickly, having a second thought that maybe my suggestion is excessive.

I may post again, in my opinion this FloatingHotspot module should rather have a direct way of making gui invisible, like Show/Hide/SetVisible(bool) function.
I vaguely remember this problem, maybe it's a very old module and nobody fixed it still.

SMF spam blocked by CleanTalk