Community
SCI Programming => Mega Tokyo SCI Archive => Topic started by: Lightfoot on December 30, 2002, 10:03:25 AM
-
As far as I know this should work...
In Rm1's RoomInstance HandleEvent
(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.
-
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.
-
OK, So here is what I have done.
I changed it from..
SetCursor(1)to...
SetCursor(1)
= gCurrentCursor 1
and in user.sc
(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
(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.
-
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.
-
But I still want to change the menubar.
-
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.
-
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.
-
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.