Problem with cursor mode 1

Started by Windenwart, Tue 20/03/2007 15:47:09

Previous topic - Next topic

Windenwart

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?

Ashen

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

Windenwart

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

Dualnames

Well everything would be easy if you could add your own cursor modes but hey, chris is doing his best.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Khris

#4
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"):

Code: ags
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

Windenwart

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

Code: ags
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();

SMF spam blocked by CleanTalk