Adventure Game Studio

AGS Support => Modules, Plugins & Tools => Topic started by: on Wed 16/04/2003 13:27:56

Title: Broken Sword-style single cursor interface
Post by: on Wed 16/04/2003 13:27:56
Hello

Is it possible to use one cursor for walking, looking, using, ect...
And if so how can I make one.
Title: Re:help with cursor
Post by: on Wed 16/04/2003 13:46:33
Thank you for your reply,

But I i'm looking for someting els. I want to make an adventure game with one cursor. The player has only the arrow cursor to play with. For example when he wants to walk somewhere he just have to click there, he also can use the same cursor when he wants to look at somthing or pick something up. The player does not have to use differend kind of cursors.

Many thanks
Title: Re:help with cursor
Post by: Michael Zhu on Thu 17/04/2003 07:21:15
You have to set up your game so that every hotspot's, object's, character's interactions must be "any click on etc". That way, no matter which cursor mode you have, it's gonna do the same thing, i.e addinventory or displayspeech.

Cheers
Title: Re:help with cursor
Post by: on Thu 17/04/2003 11:20:18
thank you verry much. ;D
Title: Re:help with cursor
Post by: RickJ on Thu 17/04/2003 16:56:26
Loeky,  You will need to use the on_mouse_click() event handler in the global script to handle all of the cursor stuff.  So you will have only one cursor mode (mode 6 for example is a  pointer) and you will then have  to resolve what operation will be performed  inside the on_mouse_click() function.

Title: Re:help with cursor
Post by: Enlaithion on Sat 19/04/2003 00:10:14
Didn't Sierra do this in KQ7?  They used the universal "wand" cursor.  It was a great idea, very convenient!

Couldn't you also add to it, like when you place the mouse over the hotspots, the cursor will change to an interact sprite, look, talk, etc...

That's do-able isn't it?

Enlaith
Title: Re:help with cursor
Post by: remixor on Sun 20/04/2003 03:52:25
This is what I'm doing in my game.  Revolution also did it in Broken Sword 1 and 2.

(They're retail 2D point and click games released in 96 and 97 and I only bring them up because they are excellent games and make good use of the single cursor idea.)
Title: Re:help with cursor
Post by: Enlaithion on Wed 23/04/2003 00:24:20
Thanx remixor.  I'll check them out.  

Have you ever played "The Adventures of Willy Beamish?"  It's an excellent game that uses the same cursor idea.  You can get it off of any abandonware site.
Title: Re:help with cursor
Post by: on Wed 21/04/2004 14:56:18
This is exactly what I'm looking for too (BS style cursor). Did enyone ever figure out how to to it. (I see the post I'm replying to was posted a year ago)
Title: Re:help with cursor
Post by: on Wed 21/04/2004 16:41:03
If anyone's still interested ......

I think you'd just have to:
-Disable the ability to change cursor mode (remove the right click function and the GUI buttons).
-Set default cursor mode to'Walk to', with a different graphic
-Do all character/hotspot/object interactions as 'Any click on'

That should work, shouldn't it?

The only problem would be you could only do the default action (Talk to character, pick up object, etc.), which might be a bit annoying if you just wanted to look at it.
Title: Re:help with cursor
Post by: .. on Wed 21/04/2004 19:55:19
Broken sword didn't really use one cursor .. they had it so that when u hovered over something it automatically changed to what you can do..
Is there a way you can do this?
Title: Re:help with cursor
Post by: on Wed 21/04/2004 20:17:46
I suppose a series of conditional statements in the code, to change the cursor mode based on where it is would work, but could get quite complicated.

E.g.:

if (GetObjectAt (mouse.x, mouse.y) == 0) SetCursorMode (MODE_USE);
else SetCursorMode (MODE_WALK);

In the 'Repeatedly Execute' part of the room script should set the cursor to Interact made over object 0, and Walk everywhere else.  You could use something like this to set a different mode for each object / hotspot / character, or using:

if (GetObjectAt (mouse.x, mouse.y) !=-1) SetCursorMode (MODE_USE);

in the Global 'Repeatedly Execute' should set Interact on all objects.

Haven't had time to test this though, so it might not work, as I'm kind of new to this myself.
Title: Re:help with cursor
Post by: Farsight on Wed 21/04/2004 22:26:26
All you do is set all the hotspots to any click and then change the "when mouse over hotspot" change graphic to whatever. Then if you want multi function you could right click while over hotspot to rotate the different views / commands. I'm not sure how you would do this but it's just an idea.
Title: Re:help with cursor
Post by: on Wed 21/04/2004 22:51:47
I didn't notice that until after I'd posted, unfortunately. However, you would still need something to deal with mouse over characters/objects, as they don't have it built in.

Also, the coding in my last post wouldn't let you deal with Inventory items (MODE_USEINV). I'm working on a test room in this style - if anyone's interested, I'll post a link to it on this board when I'm done.
Title: Re:help with cursor
Post by: on Thu 22/04/2004 09:31:02
I look forward to that, Ashen. I hope you'll find a way to work it out.
Title: Re:help with cursor
Post by: on Thu 22/04/2004 12:30:49
Right, for any one interested, my attempt can be FOUND HERE (http://www.geocities.com/whoismonkey/Cursor.zip)

Feedback of any sort is welcomed, except abuse, I just don't think I could handle that. (sob) :'(
Title: Re: help with cursor
Post by: Khris on Fri 03/09/2004 01:52:02
I just played your demo, it's great.

Beneath a Steel Sky (also by Revolution but much older than BS) uses this, too.

However, this method provides less flexibility.
You could still implement looking at things by right-clicking on them, but you can't any longer e.g. rob (interact with) another character.
This could be solved by opening a small GUI that lets you select whether you want to interact with or talk to the character. I think Lure of the Temptress uses this method.

My personal favourite of what I've seen so far in AGS games is Yahtzee's approach to the problem in 7 days a sceptic. (left-click: walking, right-click: GUI with choices opens)
Title: Re: Broken Sword-style single cursor interface
Post by: vpresrufus on Thu 24/03/2005 16:18:00
somebody made an AGS template for the broken sword style cursors. I happen to be working off it for my games GUI. if anyone is interested, pm me, email or msn me at ec_blue@hotmail.com. and let me stress i did NOT make this template, merely stumbled across it on the web (and happen to think its rather brilliant, grats to the author, whoever he may be)