'Notify' - ALAN game showing how to program score change messages by stephen.griffiths@xtra.co.nz Brief summary - use an attribute to record the current score. - run an event each turn to check if player's score now changed from the recorded score. (And display a message if its changed.) - note need to ensure the 'check score' event is run after any other events that might affect the score. (An event changing player score is probably a rare occurence but there's examples in this demo game.) - provide a way for the player to turn off the score messages if they want (eg: a 'notify' verb like in this demo.) - Look at the source code for more details. --------------------------------------------------------------- Now let's play the game ..... You need to get through this door. On The Threshold. There is a closed door to the north. There is a mat here. > open door The door seems to be locked. > examine the mat Its a pretty ordinary mat with a slight lump where something seems to be lying beneath it. > look under the mat Lifting the mat reveals a key. (Your score has gone up by 2 points. You can use the NOTIFY command to disable score change messages like this one.) > take key Taken. (Your score has gone up by 2 points.) > notify Score notification is now disabled. (You can turn it back on using the NOTIFY command again.) > unlock the door with the key The door is now unlocked. > notify Score notification is now enabled. (You can turn it off using the NOTIFY command again.) > open the door The door is now open. (Your score has gone up by 3 points.) > n Congratulations .... .... you've won the game! You have scored 10 points out of 10. Do you want to RESTART, RESTORE or QUIT ?