PQ3 Driving Interface Style (Now code posted)

Started by Moresco, Sun 01/05/2005 00:16:00

Previous topic - Next topic

Moresco

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!
::: Mastodon :::

Ashen

You're probably going to have to use GetObjectAt (x,y), in rep_ex. E.g.:
Code: ags

if (GetObjectAt (mouse.x, mouse.y) == 1) ChangeCursorGraphic (MODE_USE, 25);
else if (GetObjectAt (mouse.x, mouse.y) == 2) ChangeCursorGraphic (MODE_USE, 38);
//etc
I know what you're thinking ... Don't think that.

Moresco

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.
::: Mastodon :::

Ashen

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.
I know what you're thinking ... Don't think that.

Moresco

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!
::: Mastodon :::

2ma2

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. :)

Moresco

#6
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.
::: Mastodon :::

SMF spam blocked by CleanTalk