Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Mr_Threepwood2

#1
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

  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:

Code: ags

		    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.
#2
I have read several threads about Lucas Arts style of GUI, I have even made a fully working one before.  The problem I am now facing is more of a "will I trap myself by making it this way" style question.

Basically I have two ideas for making a Lucas Arts Style GUI.

IDEA 1:

This is the idea involves making separate cursors for every cursor mode, which will let me use those nice and easy drop down selections for most of the interactions.  A status line will be based off the current mouse mode.  The problems I am looking at with this style are I don't know if it will cause some troubles setting up a right click (which will do the default interaction on an object), and it will involve some extra coding for.  Another big problem here is unhandled_event won't get called for cursors past 9 (usermode 2).

IDEA 2:

Make the cursor always use usermode 1 unless walking or clicked use on an inv item.  So the actual "mode" of the cursor remains the same but it can be changed using a global int that represents the real mode I'm on.  This means that all interactions will have to dealt with using code under the "any click on" property of objects, characters etc.  Another problem I may have here is that I don't know how I'd go about setting the "use inv" up, and how I'd go about having animated cursors since the cursor is never really changing from usermode 1 (I guess I could set up a function to swap the cursor view based on the global int?).
SMF spam blocked by CleanTalk