Author Topic: Drop inventory item (SCI 1.1)  (Read 2650 times)

0 Members and 1 Guest are viewing this topic.

Offline gumby

Drop inventory item (SCI 1.1)
« on: March 23, 2017, 08:27:21 PM »
I have chosen an item from my inventory and I want to drop it in a room.  The item is selected from inventory and the mouse cursor is changed to represent the item the ego is holding. 

Here's what I have in the doVerb method (conditional logic removed for clarity):
Code: [Select]
   (gEgo put: INV_LEAFLET)   ;Remove item from inventory
   (leaflet show:)                     ;Display the prop in the room

What I can't seem to figure out is how to get the mouse cursor (a leaflet) to change back to say the look or walk icon & have the verb change as well.  I can set the cursor manually:

Code: [Select]
   (gGame setCursor: 996 1)

But that doesn't change the verb, and I'm sure this isn't the right way to be doing this. What am I missing here?
« Last Edit: March 23, 2017, 08:32:39 PM by gumby »


In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline Kawa

Re: Drop inventory item (SCI 1.1)
« Reply #1 on: March 23, 2017, 09:02:42 PM »
Off the top of my head, what about (icon0 select:)? Assuming icon0 is walk.

Offline gumby

Re: Drop inventory item (SCI 1.1)
« Reply #2 on: March 23, 2017, 09:16:41 PM »
I figured it out, though not sure if it's the best way:

Code: [Select]
   (gGame handsOff:)
   (gEgo put: INV_LEAFLET)   ;Remove item from inventory
   (leaflet show:)                     ;Display the prop in the room
   (gGame handsOn:)

If I dig into those methods in the Main script I can probably make it simpler.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition


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

Page created in 0.066 seconds with 22 queries.