Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Moresco on Sun 01/05/2005 00:16:00

Title: PQ3 Driving Interface Style (Now code posted)
Post by: Moresco on Sun 01/05/2005 00:16:00
Hey people.  Well, I am trying to make a similar driving interface to the one in PQ3 - basically I want to start with some basics and then redesign it some.   Though, I have a problem.   First I thought, well I'll make hotspots and when mouseover certain hotspots I'll change my cursor and then also change the click functions to affect my animation.

Unfortunately if you've ever played PQ3, you know that the cursor changes over the little road.  I tried making the road animation an object, and then use various conditionals to change the animation views to correspond to intersections - road speed etc.  But you can't mouseover a hotspot if an object is on top of it.  Is there another way to change the cursor over an object?

I'll keep working on it, please help if you can!
Title: Re: PQ3 Driving Interface Style
Post by: Ashen on Sun 01/05/2005 00:29:50
You're probably going to have to use GetObjectAt (x,y), in rep_ex. E.g.:

if (GetObjectAt (mouse.x, mouse.y) == 1) ChangeCursorGraphic (MODE_USE, 25);
else if (GetObjectAt (mouse.x, mouse.y) == 2) ChangeCursorGraphic (MODE_USE, 38);
//etc
Title: Re: PQ3 Driving Interface Style
Post by: Moresco on Sun 01/05/2005 01:50:04
That's awsome, I almost have it working.  Only thing I need now is something to return the last normal gui cursor used before moving over the other areas.  Can I do something like - get mouse mode? set mouse mode?  I searched in the manual but I couldn't find anything.  I tried a pointer but that didn't seem to work either.
Title: Re: PQ3 Driving Interface Style
Post by: Ashen on Sun 01/05/2005 01:56:58
Not entirely sure what you mean. There's GetCursorMode () and SetCursorMode(), of course, but I don't see what use they'd be. Perhaps SaveCursorForLocationChange();? It depends on what code you're actually using so far.
Title: Re: PQ3 Driving Interface Style
Post by: Moresco on Mon 02/05/2005 03:00:28
Hm ok I managed to get all the icons working for the Driving Interface.  The onMouseClick detects the clicks and changes the animation speeds of the road.  How would I do the intersections, changing directions and keeping track of where you are in the city??

If anyone can help with this it'd be appreciated greatly! I'm stumped!
Title: Re: PQ3 Driving Interface Style
Post by: 2ma2 on Mon 02/05/2005 09:16:40
Well, my first impression is: why simulating such a horrid piece of gameplay? ;)

The second, judging from your descriptions, I'd say you make up a simple grid of x and y coordinates, set as simple local variables, and add and subtract as you go through intersections. Perhaps an actual animation of the car turning, then having just using the inset direction systems of the views.

Please post code. :)
Title: Re: PQ3 Driving Interface Style
Post by: Moresco on Mon 02/05/2005 16:44:59
Anyway I got it working.  I will work on the code a bit more and then post it on my website for people to see.  Peace.