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:
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:
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.
Try using IsInterfaceEnabled.
https://adventuregamestudio.github.io/ags-manual/Globalfunctions_General.html#isinterfaceenabled
It works perfectly, thank you! In the end I have done this:
if(IsInterfaceEnabled() == false) {
FloatingHotspot.SetVerticalOffset(1000);
}
else {
FloatingHotspot.SetVerticalOffset(-5);
}
Ok. No, it was not in the module. (I think a previous post has been deleted).
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.