Many many animated cursors

Started by Vince Twelve, Wed 16/02/2005 13:32:10

Previous topic - Next topic

Vince Twelve

I looked around for a bit.  Sue me if it's been covered.

I'd like for my cursor to change to a short (usually only 2 frame) animation when you mouse over any hotspot or item.  I know how to do this, simply creating a cursor mode that animates with a set view.  My problem is that each object and hotspot has its own cursor animation that gives some idea of what you're about to do with that object.

Hypothetical examples:  mouse over a button, you see a finger pressing a button.  Mouse over a dog, you see a hand petting a dog.  Pick up your inventory key and mouse over a lock, you see the lock fitting in the keyhole... etc.

The problem I have is that I'd like to have more cursor anims than I have cursor modes.  If I can only have 20 cursor modes, and there is no way to change the cursor's animation view in script... does this mean I can only have a maximum of 20 cursor animations?  Or is there a way to change the cursor's view in script that I can't find?

This probably hasn't been a problem before because no one is crazy enough to make that many cursor anims.  Well... I am that crazy, and it is a problem.

Scummbuddy

ChangeCursorGraphic
ChangeCursorGraphic (int mode, int slot)

Changes mouse cursor mode MODE's cursor graphic to SLOT. This permenantely changes the specified mode's cursor graphic. This function may be useful if you need more than the maximum number of mouse cursors.
Example:

ChangeCursorGraphic (MODE_LOOK, 120);

will change the cursor's graphic for look mode to the image that's imported in the sprite's manager slot 120.
---------------------------

Now, if you really need more than 20 or whatever the current max is, and you start your game and actually make your 20 and need more, then Pumaman will bump up the maximums for you and release a new version with the increased amount. Its just that he wants to make sure that its worth him doing.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Vince Twelve

Quote from: Scummbuddy on Wed 16/02/2005 14:24:11
ChangeCursorGraphic (MODE_LOOK, 120);

will change the cursor's graphic for look mode to the image that's imported in the sprite's manager slot 120.

Right, I'm currently using the ChangeCursorGraphic function as a temporary fix, but my hope was to have animated cursors, and this only changes it to a static sprite.

What would be awesome would be a ChangeCursorView function or something like that...

Quote from: Scummbuddy on Wed 16/02/2005 14:24:11
Now, if you really need more than 20 or whatever the current max is, and you start your game and actually make your 20 and need more, then Pumaman will bump up the maximums for you and release a new version with the increased amount. Its just that he wants to make sure that its worth him doing.

Or that would work.  The game is already well underway.  The only thing stopping me from animating the more than twenty cursor graphics, is the fear that I won't be able to use them...

strazer

QuoteWhat would be awesome would be a ChangeCursorView function or something like that...

Yeah, I would like that as well.

For the moment, one could probably code a workaround using ChangeCursorGraphic and rep_ex to manually animate the mouse cursor. But this seems rather messy.

Vince Twelve

#4
Quote from: strazer on Wed 16/02/2005 14:43:39
But this seems rather messy.

Indeed.

If there isn't a tidy scripting workaround here, I'm just going to let the cursors be static images.Ã,  It was only meant to be a simple-get-used-to-AGS-before-moving-on-to-bigger-projects-with-the-engine kind of game, but I'm just such a damn perfectionist that I try to do way more than I need to.

No use in bumping up the number of cursor modes.Ã,  The only reason I'm using more than two in my game is to allow these different animations.Ã,  If you're using cursor modes for the reasons you are supposed to be using cursor modes, there should be no reason to use more than twenty... ever...

But a ChangeCursorView (as well as being able to set a specific loop within that view) would be shiny.

Pumaman

ChangeCursorView sounds a reasonable enough request to me.

Proskrito




SMF spam blocked by CleanTalk