So...
I'm working on a new GUI for my game. I'll be using a verb coin with about four or five different actions (still haven't decided yet).
I'd like to have a lebel in the middle of the verb coin that acts as a mouse-over text. It tells the name of each button that the cursor is on..
The problem is that the text only shows up for one of my buttons (button 3). The others don't display anything.
Here's the code I'm using (all in the global repeatedly_execute):
Code: ags
This should change the text on label 4 when the mouse is over the buttons, and clear the text when the mouse is on nothing. Instead, it only displays the "climb" text when the mouse is over that button. Any ideas?
EDIT:
Also, one more unrelated thing:
For some reason, if I have a sound set to play in a loop at frame 0, I don't hear anything. I know it worked on an earlier version of AGS, though. Is there a reason why this has changed?
I'm working on a new GUI for my game. I'll be using a verb coin with about four or five different actions (still haven't decided yet).
I'd like to have a lebel in the middle of the verb coin that acts as a mouse-over text. It tells the name of each button that the cursor is on..
The problem is that the text only shows up for one of my buttons (button 3). The others don't display anything.
Here's the code I'm using (all in the global repeatedly_execute):
//If mouse is not over a hotspot...
if(GetLocationType(mouse.x,mouse.y)==0) {
if(GetGUIAt(mouse.x,mouse.y)==COIN){
if(GetGUIObjectAt(mouse.x,mouse.y)==0) SetLabelText(COIN,4,"look");
if(GetGUIObjectAt(mouse.x,mouse.y)==1) SetLabelText(COIN,4,"talk");
if(GetGUIObjectAt(mouse.x,mouse.y)==2) SetLabelText(COIN,4,"push");
if(GetGUIObjectAt(mouse.x,mouse.y)==3) SetLabelText(COIN,4,"climb");
else SetLabelText(COIN,4," ");
}
}
This should change the text on label 4 when the mouse is over the buttons, and clear the text when the mouse is on nothing. Instead, it only displays the "climb" text when the mouse is over that button. Any ideas?
EDIT:
Also, one more unrelated thing:
For some reason, if I have a sound set to play in a loop at frame 0, I don't hear anything. I know it worked on an earlier version of AGS, though. Is there a reason why this has changed?