Well, then here's the whole room script. Hope someone can help me with this

/******************************************************************************
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")
/******************************************************************************/
(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) // an example of setting it to 0
ignoreActors()
)
// Check which room ego came from and position it
(switch(gPreviousRoomNumber)
/******************************************************
* Put the cases here for the rooms ego can come from *
******************************************************/ /*
(case north
(send gEgo:
posn(210 110)
loop(2)
)
)*/
// Set up ego's position if it hasn't come from any room
(default
(send gEgo:
posn(200 150)
loop(2)
)
)
)
// 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 (changeState newState)
= state newState
(switch(state)(case 0
Print(
"State 0: waiting 20 cycles... tai sitten ei..."
dsCOORD 5 5 dsCOLOUR clBLACK dsBACKGROUND 10 0
)= cycles 2)(case 1
Print(
"State 1: waiting 50 cycles..."
dsCOORD 5 5 dsCOLOUR clBLACK dsBACKGROUND 10 0
)= cycles 2)(case 2
Print(
"State 2: waiting 10 cycles..."
dsCOORD 5 5 dsCOLOUR clBLACK dsBACKGROUND 10 0
)= cycles 2)(case 3
Print(
"State 3: waiting 40 cycles..."
dsCOORD 5 5 dsCOLOUR clBLACK dsBACKGROUND 10 0
)= cycles 2)(case 4
Print(
"State 4: this is the last cycle."
dsCOORD 5 5 dsCOLOUR clBLACK dsBACKGROUND 10 0 ))))
(method (handleEvent pEvent)
(super:handleEvent(pEvent))
/*****************************************
* Handle the possible said phrases here *
*****************************************/
(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('look [< around]'))
Print("You are in an empty room")
)
)
)
/******************************************************************************/
(instance theKey of Prop
(properties
y 160
x 160
view 400
)
)