Home | SCI Documentation | SCI Tutorials | SCI Tools | SCI Wiki | Community

Chapter 6 - Inventory Room Loose Ends

This chapter deals with tidying up a couple of loose ends in regards to the point and click inventory room.

Pic Resource

I know I haven't mentioned it until now, but you will of course need a room picture. Well since the scriptNumber is 500, and the view resources are saved as 500, and the text is saved as 500, can you guess what number I want you to make your picture, yeah that's right 500. I suppose I'll be nice for once, you can just download mine if you want.

Pic 500


Inventory Items at Start

I suppose you'd probably like to have these or possibly other inventory items in your pocket as soon as you start the game. Luckily, this only requires one quick little edit, specifically in the InitRooms script.

In the (init) method, find the bit about the gEgo:
Code:
 (send gEgo:
    view(0)
    posn(-1 -1)
    setStep(1 1)
    setMotion(MoveTo 3000 100)
    setCycle(Walk)
    init()
 )
Somewhere inside that , simply add this line:
Code:
  get(1) get(2) get(3) // cash, balloon, string

And now that's done, you will now have the inventory items as soon as the game starts. Keyboard Shortcut (tab) and the Menu Inventory selector

So you have made all the cursors, texts, views, and scripts that I've told you to make, and I suppose that now you want to see it in action. Until we actually create the own point and click menu, you might find that it is actually kind of a pain in the butt to get into that room. Well don't worry, I wouldn't leave you hanging like that. With one small edit to the inv script you'll be tying that string onto the balloon in no time.

Open up the inv script and around line 70, you should find this:
Code:
(method (showSelf theOwner)
   (
invD:
       text(carrying)
       doit(theOwner)
   )
)

   
Simply change that into this:
Code:
(method (showSelf theOwner)
// (invD:
//     text(carrying)
//     doit(theOwner)
// )

   (if(== canTab TRUE)
   =
gPreviousCursor gCurrentCursor
   (send gRoom:newRoom(500))
   )
)

And there you go, now you can enter your new point and click inventory room by either pressing the tab button or by selecting inventory from the menu options. So until we get the rest of the game converted to point and click, at least you have that much. That sums up all the loose ends regarding the point and click inventory room that I know of.

< Previous: Chapter 5 - Scripting the Inventory Room Next: Chapter 7 - Preparing the Supporting Scripts >
 

by helping to defray some of the costs of hosting this site. If it has been of help to you, please consider contributing to help keep it online.
Thank you.
pixe
Top

© 2013 to present The Sierra Help Pages. All rights reserved. All Sierra games, artwork and music © Sierra.