Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Windenwart on Tue 20/03/2007 15:47:09

Title: Problem with cursor mode 1
Post by: Windenwart on Tue 20/03/2007 15:47:09
Hi,

the manual says, that I can free use the cursor modes 1, 2, 3, 5, 8 and 9 for my interactions.
The problem is, in cursor mode 1 the character don't run to the hotspot first. What's wrong with this mode?
Title: Re: Problem with cursor mode 1
Post by: Ashen on Tue 20/03/2007 15:51:00
Nothing, that's the default behavior - the theory being that it'd get pretty annoying if you had to do a blocking walk if you just want to know what something is. However, you can override that by checking the 'Walk to hotspot in Look mode' box on the 'General Settings' pane.
Title: Re: Problem with cursor mode 1
Post by: Windenwart on Tue 20/03/2007 16:11:38
Thank you.

In this case, not only cursor modes 4, 6 and 7 are 'hard-coded', the cursor mode 1 is a special cursor mode too. I would add this information to the manual!

Are other modes from 1, 2, 3, 5, 8 and 9 special too?

At the moment I have this setting for my game:
1 = Look
2 = Open
3 = Talk
5 = Pick up
8 = Pull
9 = Push
Title: Re: Problem with cursor mode 1
Post by: Dualnames on Wed 21/03/2007 20:48:54
Well everything would be easy if you could add your own cursor modes but hey, chris is doing his best.
Title: Re: Problem with cursor mode 1
Post by: Khris on Wed 21/03/2007 21:19:06
You *can* add many more cursor modes, but doing so won't add interactions. The simple reason: The current system is way cleaner.

Just use "any click on X" and code like this (provided you've called the modes "Pull" and "Push"):

if (mouse.Mode==eModePull) {
  ..
}
else if (mouse.Mode==eModePush) {
  ..
}
// aso.


Since every hotspot's and object's interaction will end up in the room script, using a single interaction to group all additional modes will keep the script nice and tidy.

This is documented in the manual, too:
http://www.adventuregamestudio.co.uk/manual/Hotspot%20interactions.htm
Title: Re: Problem with cursor mode 1
Post by: Windenwart on Thu 22/03/2007 15:42:20
Ok, Thank you! @KhrisMUC: good hint!

Now, I have exclude the standard cursors for free programing:

- Cursor 0: unused0
- ...
- Cursor 9: unused9

- Cursor 10: WALK
- Cursor 11: PICK
- Cursor 12: OPEN
- Cursor 13: PUSH
- Cursor 14: PULL
- Cursor 15: TALK
- Cursor 16: LOOK

if (mouse.Mode == eModeWALK)
{..}
else if (mouse.Mode == eModePICK)
{..}
else if (mouse.Mode == eModeOPEN)
{..}
else if (mouse.Mode == eModePUSH)
{..}
else if (mouse.Mode == eModePULL)
{..}
else if (mouse.Mode == eModeTALK)
{..}
else if (mouse.Mode == eModeLOOK)
{..}
else Default();