! Sample dark daemon framework for IAGE ! 011115 Robin Rawson-Tetley GameCode { AfterInputImmediate: CodeExtend [ ' This line below calls the DarkDaemon ' delete it if you do not want to kill ' players who spend too long in the dark. call DarkDaemon.inthedark ] } Module DarkDaemon { ' In the dark deamon - for those situations where ' you want to kill your player in the dark. ' just call this from the AfterInputImmediate ' event and it will do the rest. proc inthedark if ( currentplayer.cansee = false ) then currentplayer.setvalue(darkdaemon) = currentplayer.getvalue(darkdaemon)_+_1 if ( currentplayer.getvalue(darkdaemon) = 1 ) then currentplayer.print First^warning^you^that^you^are^going^to^die!! currentplayer.outputtoplayer = false end endif if ( currentplayer.getvalue(darkdaemon) = 2 ) then currentplayer.print Second^warning^you^that^you^are^going^to^die!! currentplayer.outputtoplayer = false end endif if ( currentplayer.getvalue(darkdaemon) = 3 ) then currentplayer.print 3^chances-You^die! call StandardLib.Dead end endif else currentplayer.setvalue(darkdaemon) = 0 endif end }