You should take some time to read the tutorial on the death script
hereSome excerpts from it:
(method (handleEvent pEvent)
(var dyingScript)
(super:handleEvent(pEvent))
(if(Said('die'))
= dyingScript ScriptID(DYING_SCRIPT) // This is the line of code you're missing
(send dyingScript:
caller(3)
register("You're dead dude! Thank you for playing \"Tutorial Quest\"!")
)
(send gGame:setScript(dyingScript))
)
Basically, the ScriptID thing, as I understand it, will load the DYING_SCRIPT script (Dying.sc). Then it will return a pointer to the first instance in that script, which if you go look in Dying.sc, happens to be
(instance public DyingScript of Script
The term "script" is a little overused here. I'm using it to refer to both the code file Dying.sc, and also the particular instance object returned by ScriptID, which happens to be DyingScript, which is of type "Script"! (it could be anything though... it's whatever the first instance object is in a code file)
Now, you know that rooms have Scripts associated with them, but you can also associated a special Script with the "whole game", and that is what the last line there does...
Hope that helped explain what's going on a bit.
I eagerly await your game!