Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: CTxCB on Wed 19/10/2011 23:54:35

Title: Mouse Animation
Post by: CTxCB on Wed 19/10/2011 23:54:35
I have a problem, I want my Cursor to change when over a certain hotspot, to a different animation, but when I do, it looks slow, and when moved, it flickers over the hotspot, I want a way that It wont flicker over the hotspot, and will go at a Delay speed of 1, instead of 5, I currently have:

function hSkull_MouseMove()
{
Mouse.Mode = eModeSpin;
}
Title: Re: Mouse Animation
Post by: NickyNyce on Thu 20/10/2011 00:22:29
If you want to change your cursors animation speed, click on each frame in your animations view and change the delay....do all of them. As for the flickering, I can't help you, but I'm sure someone will be along soon to help you with that.

You can also change the speed to -1 and less if you wish or higher to speed it up
Title: Re: Mouse Animation
Post by: CTxCB on Thu 20/10/2011 00:42:40
Quote from: NickyNyce on Thu 20/10/2011 00:22:29
If you want to change your cursors animation speed, click on each frame in your animations view and change the delay....do all of them. As for the flickering, I can't help you, but I'm sure someone will be along soon to help you with that.

You can also change the speed to -1 and less if you wish or higher to speed it up

That does not help, all the Frames in View4 are already at 0, I think I need a way that it sets the view in code form...
Title: Re: Mouse Animation
Post by: Khris on Thu 20/10/2011 05:30:07
Try setting the individual frame delays to negative numbers.

As for the code, try this to prevent flickering:

function hSkull_MouseMove()
{
  if (mouse.Mode != eModeSpin) mouse.Mode = eModeSpin;
}
Title: Re: Mouse Animation
Post by: CTxCB on Thu 20/10/2011 05:41:54
Quote from: LeKhris on Thu 20/10/2011 05:30:07
Try setting the individual frame delays to negative numbers.

As for the code, try this to prevent flickering:

function hSkull_MouseMove()
{
  if (mouse.Mode != eModeSpin) mouse.Mode = eModeSpin;
}

Ok, I set the Delay on each frame to -4, which seems to give the desired effect, But the code doesn't fix the flickering, its fine when frozen still, but if the mouse moves, it flickers...
Title: Re: Mouse Animation
Post by: Khris on Thu 20/10/2011 05:52:50
But regardless of the flickering, the animation is displayed in full?
Because initially I thought that maybe the animation is restarted every frame as long as the mouse is moved.

Not sure what exactly is causing the flickering, if you preview the animation in the editor, does it look ok there?
Title: Re: Mouse Animation
Post by: CTxCB on Thu 20/10/2011 06:04:02
Quote from: LeKhris on Thu 20/10/2011 05:52:50
But regardless of the flickering, the animation is displayed in full?
Because initially I thought that maybe the animation is restarted every frame as long as the mouse is moved.

Not sure what exactly is causing the flickering, if you preview the animation in the editor, does it look ok there?

The Animation plays normal, even if its moved, and the animation is fine in the Viewer, the only thing that happens is that it flickers when moving, animation still playing
Title: Re: Mouse Animation
Post by: AnasAbdin on Thu 20/10/2011 12:02:40
a humble opinion:
are you sure there's nothing in the rep_exec causing this?
Title: Re: Mouse Animation
Post by: CTxCB on Thu 20/10/2011 13:06:25
Quote from: AnasAbdin on Thu 20/10/2011 12:02:40
a humble opinion:
are you sure there's nothing in the rep_exec causing this?

Nothing in there at all...
Title: Re: Mouse Animation
Post by: CTxCB on Thu 20/10/2011 18:16:52
Quote from: AnasAbdin on Thu 20/10/2011 12:02:40
a humble opinion:
are you sure there's nothing in the rep_exec causing this?
OMG, Thank you, I decided to put a Rep_exec in the room and fiddle with it and I fixed my problem by placing:

function room_RepExec()
{
Mouse.Update ();
}