(include "sci.sh")
(include "game.sh")
/******************************************************************************/
(script 1)
/******************************************************************************/
(use "main")
(use "controls")
(use "cycle")
(use "game")
(use "feature")
(use "obj")
(use "inv")
(use "autodoor")
(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 2
east 0
south 3
west 0
)
(method (init)
)
(doornorth:
init()
)
(thecrate:
init()
setCycle(Fwd)
cycleSpeed(1)
)
(cleaner:
init()
setCycle(Walk)
setMotion(Wander)
)
(bgship:
init()
setCycle(Fwd)
setMotion(MoveTo 320 30 RoomScript)
ignoreActors()
setPri(0)
)
(pump:
init()
)
// same in every script, starts things up
(super:init())
(self:setScript(RoomScript))
// 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(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)
(var dyingScript)
(super:handleEvent(pEvent))
/*****************************************
* Handle the possible said phrases here *
*****************************************//******************************************************************************/
(instance doornorth of AutoDoor
(properties
entranceTo 2
locked FALSE
)
)
(instance thecrate of Prop
(properties
y 140
x 110
view 998
)
)
(instance cleaner of Act
(properties
y 170
x 190
view 2
)
)
(instance pump of Prop
(properties
y 135
x 147
view 997
)
)
(instance bgship of Act
(properties
y 30
x 20
view 3
)
)
)