OK so here's my situation.
I've set up a Lucas arts style GUI and now I am trying to get the mouse to animate when it goes over hotspots, objects, inv items, etc. Since I am using mouse mode 8 for most of the game, I knew I'd have to script this in to repeatedly execute.
Here's some of what I have in repeatedly execute
Code: ags
Now the thing that is the strangest to me is that after I hover over something (it does start to animate at this point) then hover off, it goes to view frame 2 of the view that it was on. I can't figure out why it isn't going to the one that is set at the default in the editor.
The whole thing with mouse.changeModeView seems odd to me, I was hoping that there was more of a way to control it. Like if passing -1 to it made it stuck in view frame 1 or something, then I could just keep it always on a view.
So does changeModeView affect the default graphic somehow? Am I going about this whole business of changing the cursor wrong (considering I will have to use about 8 different views for usermode 8 since it will act as several cursors that all animate over spots)?
Edit:
When I was doing that I was testing around, now I've added this to the first if statement:
Code: ags
and it now goes back to the original graphic. Is there a better way to control all this business with cursors animating over spots? So far everything I've done with the cursors has been more or less trial and error.
I've set up a Lucas arts style GUI and now I am trying to get the mouse to animate when it goes over hotspots, objects, inv items, etc. Since I am using mouse mode 8 for most of the game, I knew I'd have to script this in to repeatedly execute.
Here's some of what I have in repeatedly execute
if (Game.GetLocationName(mouse.x, mouse.y)==""){
lblStatus.TextColor=47104;
if (mouseAnimating==true){
Mouse.UseDefaultGraphic();
}
}else{
lblStatus.TextColor=63488;
if (mouseAnimating==false){
mouse.ChangeModeView(mouse.Mode, mouseViewToUse);
mouseAnimating=true;
}
}
Now the thing that is the strangest to me is that after I hover over something (it does start to animate at this point) then hover off, it goes to view frame 2 of the view that it was on. I can't figure out why it isn't going to the one that is set at the default in the editor.
The whole thing with mouse.changeModeView seems odd to me, I was hoping that there was more of a way to control it. Like if passing -1 to it made it stuck in view frame 1 or something, then I could just keep it always on a view.
So does changeModeView affect the default graphic somehow? Am I going about this whole business of changing the cursor wrong (considering I will have to use about 8 different views for usermode 8 since it will act as several cursors that all animate over spots)?
Edit:
When I was doing that I was testing around, now I've added this to the first if statement:
mouse.ChangeModeView(mouse.Mode, -1);
mouseAnimating=false;
and it now goes back to the original graphic. Is there a better way to control all this business with cursors animating over spots? So far everything I've done with the cursors has been more or less trial and error.