HOTSPOTNAME on cursor

Started by guybrush, Tue 05/07/2005 18:40:01

Previous topic - Next topic

guybrush

Quote from: strazer on Sat 23/07/2005 16:51:13
Or try this:

Code: ags

function repeatedly_execute() {

Ã,  if (IsOverlayValid(Over)) {
Ã,  Ã,  if (IsInterfaceEnabled()) GetLocationName(mouse.x, mouse.y, Name);
Ã,  Ã,  else StrCopy(Name, "");
Ã,  Ã,  SetTextOverlay(Over, mouse.x-25, mouse.y-18, 100, 1, 15, Name);
Ã,  }

}


Hmm, I've tried that, but I'm afraid it doesn't work.
Largopredator, I'll try yours too.
SPY FUNCTION-- My first game
C O M I N G   S O O N !

hedgefield

Didn't work for me either. I've tried different versions, even checking the getmousecursor() == 7. No dice.

Guess I'll just have to add the extra lines in every script in my game aswell. It's the only way to disable the overlay during every interaction. That or rescripting the entire thing some other way.

guybrush

#22
Thnx a lot guys! You've been really helpful.
SPY FUNCTION-- My first game
C O M I N G   S O O N !

strazer

Oh yeah, sorry, the repeatedly_execute function doesn't run when the game is blocked, only repeatedly_execute_always does.
So just try changing
  function repeatedly_execute() {
to
  function repeatedly_execute_always() {

hedgefield

#24
with the _always addition, the overlay only updates when you switch cursor mode. It doesn't follow the mouse anymore. It does remove it during interactions though.

strazer

Strange, works great for me together with the code from your first post.

SMF spam blocked by CleanTalk