Ok, here goes (this is the rm001 script):
/******************************************************************************
SCI Template Game
By Brian Provinciano
******************************************************************************
rm001.sc
Contains the first room of your game.
******************************************************************************/
(include "sci.sh")
(include "game.sh")
/******************************************************************************/
(script 1)
/******************************************************************************/
(use "main")
(use "controls")
(use "cycle")
(use "game")
(use "feature")
(use "obj")
(use "inv")
(use "door")
(use "jump")
(use "dpath")
(use "wander")
/******************************************************************************/
(instance public rm001 of Rm
(properties
picture scriptNumber
// Set up the rooms to go to/come from here
north 0
east 0
south 0
west 0
)
(method (init)
// same in every script, starts things up
(super:init())
(self:setScript(RoomScript))
(if(not (send gEgo:has(INV_KEY)))
(theKey:
init()
setCycle(Fwd)
setPri(0)
)
(aMan:
init()
setCycle(Walk)
setMotion(Wander))
(aDoor:init())
)
// Check which room ego came from and position it
/******************************************************
* Put the cases here for the rooms ego can come from *
******************************************************/
(switch (gPreviousRoomNumber)
(case 2
(send gEgo:
posn(195 110)
loop(2)
)
)
// Set up ego's position if it hasn't come from any room
(default
(send gEgo:
posn(150 130)
loop(1)
)
)
)
// Set up the ego
SetUpEgo()
(send gEgo:init())
/****************************************
* Set up the room's music to play here *
****************************************/ /*
(send gTheMusic:
prevSignal(0)
stop()
number(scriptNumber)
loop(-1)
play()
)*/
/**************************************************
* Add the rest of your initialization stuff here *
**************************************************/
)
)
/******************************************************************************/
(instance RoomScript of Script
(properties)
(method (handleEvent pEvent)
(super:handleEvent(pEvent))
(if(Said('take/key'))
(if(send gEgo:has(INV_KEY))
Print("You already have it!")
)(else
(if(send gEgo:inRect(150 150 170 170))
Print("O.K.")
(send gEgo:get(INV_KEY))
(theKey:hide())
)(else
Print("You're not close enough!")
)
)
)
(if(Said('open/door'))
(if(send gEgo:has(INV_KEY))
(aDoor:locked(FALSE))
)(else
(aDoor:locked(TRUE))
)
(aDoor:open())
)
(if(Said('close/door'))
(aDoor:close())
)
(if(Said('talk/man'))
(if(< (send gEgo:distanceTo(aMan)) 40)
Print("Hello Brian!" #title "You Say:")
Print("Hello there! Welcome to SCI Studio!" #title "Brian Says:")
)(else
Print("You don't want to yell. Get closer.")
)
)
/*****************************************
* Handle the possible said phrases here *
*****************************************/
(if(Said('look'))
Print("You are in an empty room")
)
)
)
(instance theKey of Prop
(properties
y 160
x 160
view 400
)
)
(instance aMan of Act
(properties
y 170
x 220
view 1
)
)
(instance aDoor of Door
(properties
y 100
x 195
view 2
entranceTo 2
locked TRUE
)
)
I appreciate your help
