Author Topic: gCurrentCursor  (Read 2310 times)

0 Members and 1 Guest are viewing this topic.

Offline Lightfoot

gCurrentCursor
« on: December 30, 2002, 10:03:25 AM »
As far as I know this should work...

In Rm1's RoomInstance HandleEvent

Code: [Select]
(if(== (send pEvent:type) evMOUSEBUTTON)
(switch gCurrentCursor
(case 1
(if(== $0020 OnControl(ocSPECIAL (send pEvent:x) (send pEvent:y))
Print("It is a sign.")

The part that isn't working for me, is the gCurrentCursor. I tried using switch and ==. But when I click the mouse with the new cursor it does nothing and resets to gNormalCursor.


Ich lerne deutsch

Offline Lightfoot

Re:gCurrentCursor
« Reply #1 on: December 30, 2002, 10:47:23 AM »
I also want to change the menubar so that it's like in KQ5/6 with different buttons, and change the inventory so that you can select an item to change the cursor into that item.

I had so many problems with the said function. Like give/dog/bone or give/bone/to/dog the only way it would work is either give/bone or give/dog. But that leaves it pretty open, I could say give/dog/ram and it would activate the bone giving sequence.

I think with the cursors it will be more work initially, but it will make the game more dynamic and easier to play.

Though I think that this means I will have to either create a new AddMenu or edited the existing one.

I guess I really need Brian's help for this stuff. Unless someone else has already tackled it. I'd prefer not to disturb Brian. I too am looking forward to SCI VGA.
Ich lerne deutsch

Offline Lightfoot

Re:gCurrentCursor
« Reply #2 on: December 31, 2002, 09:43:28 AM »
Code: [Select]
OK, So here is what I have done.

I changed it from..
Code: [Select]
SetCursor(1)to...
Code: [Select]
SetCursor(1)
= gCurrentCursor 1
and in user.sc
Code: [Select]
(if(not(& (send pEvent:modifiers) emRIGHT_BUTTON) and (User:controls) )
(self:SetMotion(MoveTo (send pEvent:x) (send pEvent:y)))
(User:prevDir(CENTER))
(send pEvent:claimed(TRUE))
)(else
(if(>= gCurrentCursor 3)
SetCursor(1)
= gCurrentCursor 1
)(else
= gCurrentCursor (+ gCurrentCursor 1)
SetCursor(gCurrentCursor)
Then in my RoomScript's handleEvent
Code: [Select]
(if(== (send pEvent:type) evMOUSEBUTTON)
(if(== (Send pEvent:modifiers) emLEFT_BUTTON)
(switch gCurrentCursor
(case CRS_LOOK
(if(== $0008 OnControl(ocSPECIAL (send pEvent:x) (send pEvent:y)))
Print("It is a sign.")
)
)
)
)
(send pEvent:claimed(TRUE))
)
And finally I change the defines of emLEFT_BUTTON to 32 and emRIGHT_BUTTON to 35.
Ich lerne deutsch

Offline Lightfoot

Re:gCurrentCursor
« Reply #3 on: December 31, 2002, 09:46:55 AM »
User.sc checks to see if the user right clicked then switches cursors. The roomscript checks to see if the LOOK cursor is selected.

It works pretty good.
Ich lerne deutsch

Offline Lightfoot

Re:gCurrentCursor
« Reply #4 on: December 31, 2002, 10:05:39 AM »
But I still want to change the menubar.
Ich lerne deutsch

Offline Lightfoot

Re:gCurrentCursor
« Reply #5 on: January 01, 2003, 11:25:18 AM »
Well, I was going to say something, but after typing 500 words and some of which being code. I hit backspace but had the window selected.

So it sent me back a page, then when I went forward all 500 words were missing.

So, all I'll say is... I no longer use the "said" interface.
Ich lerne deutsch

Offline Sp4hn

Re:gCurrentCursor
« Reply #6 on: January 01, 2003, 01:19:57 PM »
I think it would be nice to have both keyboard and mouse input like in the sierra games that you can change your mouse cursor and stuff.  

Offline Lightfoot

Re:gCurrentCursor
« Reply #7 on: January 02, 2003, 10:30:22 AM »
Well I could do that, but then I'd have to add in all the code for each said input.

Personally I found it easier to recode the interface for cursor actions than to figure out how to capture "give dog bone" with the said input.
Ich lerne deutsch


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.045 seconds with 17 queries.