How to use control colours.

filt I have a few problems, i hope someone can help me.

I want to insert the following code

(method (doit)
(if(== (send gEgo:onControl()) ctlTEAL)
Print("kokoko")
)

Into my rm003.sc. I want it to print "kokoko" when i step on the TEAL colour that i have painted in the control picture. I also want to be able to move the ego to another room when stepping on another colour, but i cant make it work.

Where should i put the code?

Please help me
Fabian


Here is my rm003.sc code.

/******************************************************************************/
(include "sci.sh")
(include "game.sh")
/******************************************************************************/
(script 3)
/******************************************************************************/
(use "controls")
(use "cycle")
(use "door")
(use "feature")
(use "game")
(use "inv")
(use "main")
(use "obj")
/******************************************************************************/
(instance public rm003 of Rm
   (properties
      picture scriptNumber
      north 0
      east 0
      south 0
      west 0
   )
   (method (init)
      (super:init())
      (self:setScript(RoomScript))

      (switch(gPreviousRoomNumber)


(case 1
            (send gEgo:
               posn(172 137)
               loop(2)
            )
)



(default
            (send gEgo:
               posn(150 130)
               loop(1)
            )
         )
      )

      SetUpEgo()
      (send gEgo:init())
(aDoor:init())
   )
)
/************************RoomScript******************************************************/


(instance RoomScript of Script
   (properties)
   (method (handleEvent pEvent)
(var dyingScript)
(super:handleEvent(pEvent))

/*****************************************
* Handle the possible said phrases here *
*****************************************/

/* This is about the door */
(if(Said('open/door'))
(aDoor:open())
)


(if(Said('unlock/door'))
(if(send gEgo:has(INV_KEY))
(aDoor:locked(FALSE))
Print("You unlock the door.")
)(else
(aDoor:locked(TRUE))
Print("You dont have the key")
)
)
(if(Said('lock/door'))
(if(send gEgo:has(INV_KEY))
(aDoor:locked(TRUE))
Print("You lock the door.")
)(else
Print("You dont have the key")
)
)


(if(Said('close/door'))
(aDoor:close())
)

/**********************************/

(if(Said('look'))
Print("You are at the street. You can see two buildings, one with a big windows and an empty room, and one with a big intresting door.")
)
)
)
)





/******************Saker i bilden************************************************************/
(instance aDoor of Door
(properties
y 140
x 78
view 4
entranceTo 4
locked TRUE
)
)
mr-t you spelt interesting wrong