2 Y^OIEӇdd ( @ (//(  0/80@0?/8 0( ?G@POWOXOP?H0@/7@O_``h_hPX 0(P_oppxow_g@O/8'' 7p`o?G/7 0??H/8`/o?GOX@H0?/pOW?H/8 7OP?G/7( P0@PX@O0@ 0O @H/@' 00@@P0?'_OP@H( 7/7' ^^^^^^^^^^^^^^^^^^^^^^^^^^TeeBBBBeTT^^^^^^^eBDJ33333JJDBeZ^^^^TD33==#####==3JDBT^^^^eJ=###=3DeZ^^TB3# #=3JBZ^^T3#  #=JBT^^J# Sll #=JBZ^T# %,68??86,/@A*< ##45('.6787-9%:;*<=#$+&,--.,/01)2 3 $%&&'%($!)* ##  !"#     ??d򪦜@beep.wav+x RIFFWAVEfmt **data\7C\j}}pl|ugP5+4?DHMT^kzvY.(6GWgxĺtV( !7JZj~ĺuT3$)4@N_pƽ|]:%+:ESfxɽ~hH-)7ESfzĹ~a<',;GWk~ʾa?1:GSbvµhH49GP]rʿb<-9EO^tͽ]1!0AK\tϽyK&&:FRg·X1*Wv¬e85Ng̴~I1Eeëa<<[~ȿO/?cҽ{G/Ho{Q9My`DFkiC?\ñW?O~PAYuMHiYG^]FYPDfVFesPZhYmpc}a^tSX|k^tgurxr_kn_k1Gu sprBlueBall xsf@P&@Q@BX&aA$tӈ6*:IQ ص A3 Q {pÀhfb1 \bC S=aj.Wg98@܃lQ'2qt=ȡ?kqɪcidfsprWall xԻ 0 0#0uDN-SQHLN2>?Q0==3>CH A 00n8B":x,]QW"e7->kFa`'a~:I,#9Qc#"ŝSiGU;HMLJ*;!zy objBlueBall e action_move 1111011112000000s action_bounce00000000oaction_move_random00000000action_set_score10000000 action_sound00000000objWall  controller1  action_ifscore>40000000action_next_room30000000 controller2  action_ifscore>90000000action_next_room30000000levelPW [pw_id = file_text_open_write('password.txt') /* Opens the indicated file for writing, creating it if it does not exist. The function returns the id of the file that must be used in the other functions. */ file_text_write_string(pw_id,get_string('type in a level password:','')) /* file_text_write_string(fileid,str) Writes the string to the file with the given file id. get_string(str,def) Asks the player in a dialog box for a string. str is the message. def is the default value shown. */ file_text_writeln(pw_id) //Write a newline character to the file. file_text_write_string(pw_id,string(room)) /* write room index on the second line room Index of the current room */ file_text_writeln(pw_id) file_text_write_string(pw_id,string(score)) // write score on the third line file_text_close(pw_id) /* file_text_close(fileid) Closes the file with the given file id. NB: required for file to be written to */ 0000000Aaction_message'Click the ball and you will be rewarded0000000[B// initialise variables pw='' //password ri=0 // room index s=0 // score /* password.txt file is initially written at Game End and consists of three lines: level password room index score */ if file_exists('password.txt') { pw_id=file_text_open_read('password.txt') pw=file_text_read_string(pw_id) // read password file_text_readln(pw_id) ri=file_text_read_string(pw_id) // read room index file_text_readln(pw_id) s=file_text_read_string(pw_id) // read score } else { exit // don't prompt for level password on first play } file_text_close(pw_id) pw_try=get_string('What is your level password?','') // ask for PW using message box if (pw==pw_try) { room_goto(real(ri)) // room index score=(real(s)) // score } else { room_goto(0) // start over if PW forgotten score=0 } /* room Index of the current room; can be changed to go to a different room, but you better use the routines below. room_goto(numb) Goto the room with index numb. */ 0000000room1level 1        )0H`x0H`xx`H0x`H†0ÆĆH`ņƆ`dž00Ȇroom2level 2        20H`x0H`xx`H0x`H†0ÆĆH`ņƆ0ɆH0ʆ`Hˆx`̆H͆xφ0xІ`ц0҆ӆԆՆֆ0׆؆room3level 3        10H`x0H`xx`H0x`H†0ÆĆƆ`0ن`Hچ`xۆ`܆`߆0`0x0``x{\rtf1\ansi\ansicpg1252\deff0\deflang3081{\fonttbl{\f0\fnil\fcharset0 Arial;}{\f1\fnil\fcharset0 Courier New;}{\f2\fnil Arial;}} {\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red0\green0\blue128;\red0\green0\blue255;} \viewkind4\uc1\pard\cf1\fs24 Bill Kerr, December 2004 \par \par Demonstrates a level password. \par If you close the game before finishing then it will prompt you for a level password. \par Then, if you re-open the game it will prompt you to recall your password. \par If you type in the correct password then your game will be restored at the same level and score at which you left it. \par If you type in a wrong password then the game starts at the beginning \par \par A levelPW object is place in each of the three levels: \par Game End Event \par \cf2\i\f1\fs20 A password.txt file is initially written at Game End and consists of three lines:\cf1\i0 \par \cf2\i level password \cf1\i0 \par \cf2\i room index \cf1\i0 \par \cf2\i score \par \cf1\i0\f2\fs24 \par \f0 Game Start Event \par \cf2\i\f1\fs20 The password.txt is opened and the level password, room index and score values are read. \par The program then takes you back to these settings \par \par \cf1\i0\f0\fs24 The following functions are used in this program: \par \par Game End\f1\fs20 \par \cf3 file_text_open_write\cf1 ('password.txt')\cf2\i \par \cf3\i0 file_text_write_string\cf1 (pw_id,\cf3 get_string\cf1 ('type in a level password:',''))\cf2\i \par \cf3\i0 file_text_writeln\cf1 (pw_id)\cf2\i \par \cf3\i0 file_text_write_string\cf1 (pw_id,\cf3 string\cf1 (\cf4 room\cf1 ))\cf2\i \par \cf3\i0 file_text_close\cf1 (pw_id)\cf2\i \par \par \cf1\i0\f0\fs24 Game Start \par \cf3\f1\fs20 file_exists\cf1 ('password.txt') \par \cf3 file_text_open_read\cf1 ('password.txt') \par \cf3 file_text_read_string\cf1 (pw_id) \cf2\i // read password\cf1\i0 \par \cf3 file_text_readln\cf1 (pw_id) \par \cf3 file_text_close\cf1 (pw_id) \par \cf3 get_string\cf1 ('What is your level password?','') \cf2\i // ask for PW using message box\cf1\i0 \par \cf3 room_goto\cf1 (\cf3 real\cf1 (ri)) \cf2\i // room index\cf1\i0 \par \par \f0\fs24 \par }  Sprites sprBlueBallsprWallSoundsbeep BackgroundsPathsScripts Data Files Time LinesObjects objBlueBallobjWall controller1 controller2levelPWRoomsroom1room2room3 Game Information Game Options