Hello!
Code: AGS
Should work in repeatedly_exececute(). If you want it to go back to the specific mouse mode you were in, try:
Code: AGS
Maybe there's a more concise way of doing this, but for now this should work just fine.
if(GUIControl.GetAtScreenXY(mouse.x, mouse.y) != null){ //Checks whether the mouse is on ANY button
Mouse.Mode = eModePointer;
}
else{
Mouse.Mode = eModeInteract; //Or whatever
}
Should work in repeatedly_exececute(). If you want it to go back to the specific mouse mode you were in, try:
//Declare these at the top of the script
int m;
bool Switch = false;
//Then in repeatedly execute:
if(GUIControl.GetAtScreenXY(mouse.x, mouse.y) != null){
if(Switch == false){
m = Mouse.Mode;
Switch = true;
}
Mouse.Mode = eModePointer;
}
else{
if(Switch == true){
Mouse.Mode = m;
Switch = false;
}
}
Maybe there's a more concise way of doing this, but for now this should work just fine.