home *** CD-ROM | disk | FTP | other *** search
/ The GRAAL Herald 1 / GraalHerald1.lha / GraalHerald1 / 5.room < prev    next >
Text File  |  1996-11-27  |  9KB  |  174 lines

  1. /* "Live demos" room
  2. /*
  3. /* Room flags:
  4. /*    2: First visit to room, regardless of topic. 0=yes, 1=been here
  5. /*    3: Topic chosen from menu
  6. /*    4: Clock testing
  7.  
  8. /* UPDATE: scroll_frames[;normal_frames]
  9. /*
  10. UPDATE: 6;1
  11.  
  12. /* SECTION: section_no
  13. /*
  14. SECTION: 1
  15.  
  16. /* BG_IFF: file
  17. /*
  18. BG_IFF: DemoRoom.iff
  19.  
  20. /* START_POS: startpos_no;image;x;y;L|M|R;floor_no
  21. /*
  22. START_POS: 1;14;20;104;L;4
  23.  
  24. /* FLOOR: floor_no;x1;y1;x2;y2;floormaps
  25. /*
  26. FLOOR: 1;0;127;153;169;1-1/2-2/3-2/4-2
  27. FLOOR: 2;36;101;96;169;1-1/2-2/3-P1/4-4
  28. FLOOR: 3;170;131;319;170;1-P1/2-P1/3-3/4-P1
  29. FLOOR: 4;18;101;96;104;1-2/2-2/3-2/4-4
  30.  
  31. /* PATH: path_no;floor1;floor2;px1;py1;px2;py2;{more_points} (This statement is optional)
  32. PATH: 1;2;3;96;102;110;100;225;103;250;115;220;132
  33.  
  34. /* EXIT: exit_no;x1;y1;x2;y2;x;y;description (This statement is optional)
  35.  
  36. CLPART: OlafDemo.iff
  37. /* 1 is the table
  38. ROOMBOBS: 1;1;15;158;117;30;0;0
  39. /* 2 is a piece of wall hiding Olaf on entry into room
  40. ROOMBOBS: 1;2;143;153;16;58;0;0
  41. /* 3 is a table clock
  42. ROOMBOBS: 1;3;66;189;12;44;0;0
  43.  
  44. CLPART: DemoThings.iff
  45. /* 4 is the floor/path diagram
  46. ROOMBOBS: 1;4;0;62;321;85;0;0
  47.  
  48. /* STATIC: bob;image;x;y (This statement is optional)
  49. /* Table
  50. STATIC: 30;RBOB1;167;124
  51. /* Wall
  52. STATIC: 31;RBOB2;17;112
  53.  
  54. /* ANIM: bob;image;anim_ch;anim;x;y (This statement is optional)
  55.  
  56. /* ROOMOBJ: obj;name;room;VIS|NVIS;bob;image;x;y;cx;cy;cimage;prep;PICK|NPICK;anim_ch;verb;icon;LOW|MID|HIGH;types;w1;w2;w3 (This statement is optional)
  57. ROOMOBJ: 1;clock;5;NVIS;50;RBOB3;125;125;0;-2;12 ; ;NPICK;0;5; ;MID;-;a;this;it
  58.  
  59. /* Direct actions for the demo room
  60. /*
  61. /* Reset the flag dealing with the clock tutorial
  62. DACT: SETRF 4=0
  63. /*
  64. /* Load the correct Olaf graphics for this room
  65. DACT: CLPART OlafDemo.iff;BOBS 10,11,1,1,31,47,32,0;BOBS 10,21,1,49,31,47,32,0;BOBS 10,31,1,97,31,47,32,0;CLPART OFF
  66. /*
  67. /* Show the clock if that's what we're talking about
  68. DACT: IFRF 3=2;SHOW ROBJ1,125,125,RBOB3
  69. /*
  70. /* Show the floor diagram
  71. /*
  72. DACT: IFRF 3=1;PBOB 0,84,RBOB4
  73. /*
  74. /* Start a timer making Olaf comment when he's been transferred to floor 3.
  75. /*
  76. DACT: IFRF 3=1;DOAFTER 5,2,2
  77. /*
  78. /* Print the tutorial title
  79. DACT: IFRF 3=1;TYPE 4,3,4,9,BORDER,Movement Paths
  80. DACT: IFRF 3=2;TYPE 4,3,4,9,BORDER,A Useless Clock
  81. DACT: IFRF 3=3;TYPE 4,3,4,9,BORDER,Default Commands
  82. DACT: IFRF 3=4;TYPE 4,3,4,9,BORDER,Direct Commands
  83. DACT: IFRF 3=5;TYPE 4,3,4,9,BORDER,Layout Features
  84. DACT: IFRF 3=6;TYPE 4,3,4,9,BORDER,EHB Colours
  85. /*
  86. /* Lights up - enter one Viking hero
  87. DACT: LIGHTS ON;CMOVE 70,157,P
  88. /*
  89. /* First visit information
  90. DACT: IFRF 2=0;CUTSCENE 6,H;SETRF 2=1
  91. /*
  92. /* Path and floor tutorial
  93. /* (Also see the comment in the ACTION: -1;... statement, triggered by
  94. /* timer 2)
  95. /*
  96. DACT: IFRF 3=1;SAY Studying the floors and the path, shown on the floor here, and the FLOOR: and PATH: statements in 5.room, should give you an idea of how floors and paths work.
  97. DACT: IFRF 3=1;SAY By the way, the editor now handles path editing - the only tricky part is specifying which floors are at the path's end points, and of course, the usual "floor maps" mayhem...
  98. DACT: IFRF 3=1;SAY I'm going to let you study this on your own. Click on various spots in the room, both within and outside the floors, to see how I move.
  99. DACT: IFRF 3=1;SAY You will notice how I never stop along the path, but always inside a floor, as close as possible to the point you clicked.
  100. DACT: IFRF 3=1;SAY Okay, click away! Just click one of the commands in the command area when you're finished!;EXIT
  101. /*
  102. /* Clock tutorial
  103. DACT: IFRF 3=2;SAY As you may have noticed, there is a completely useless clock in the bottom right corner.;SAY It's there to show what the TIME_LAYOUT: statement can do.
  104. DACT: IFRF 3=2;SAY The time shown is the GAME time, and it doesn't have anything to do with the REAL time out there in YOUR world.
  105. DACT: IFRF 3=2;SAY You can set the game time at certain points in your adventure, or have a timer update it at regular intervals.;SAY More about that later.
  106. DACT: IFRF 3=2;SAY Now right-click the clock on the table to get the time from me personally!;EXIT
  107. /*
  108. /* Default commands
  109. DACT: IFRF 3=3;SAY Default commands - well, this program uses them EVERYWHERE.;SAY However, this is a special application - so how would you normally use them?
  110. DACT: IFRF 3=3;SAY The most common default command is probably LOOK AT (or similar).;SAY I even recommend that all objects that can appear in the inventory has this default verb.
  111. DACT: IFRF 3=3;SAY This makes browsing the inventory a more consistent affair, because only the object name and not the default verb is automatically shown in the sentence box.
  112. DACT: IFRF 3=3;SAY Other common default commands could be TALK TO for persons, and OPEN for doors.
  113. DACT: IFRF 3=3;SAY Just be careful not to make the game TOO automatic - you don't want to spoil the puzzles by giving the player default commands that solve them!;GOTO 3,1
  114. /*
  115. /* Direct commands
  116. DACT: IFRF 3=4;SAY The three commands in the command area here - "Front page", "Next page" and "Quit" - are all examples of direct commands.
  117. DACT: IFRF 3=4;SAY By the way, the diskette icon is also a direct command: "Save/load"
  118. DACT: IFRF 3=4;SAY Look in graal.main and see how they are defined in the VERB_TEXT: statements.
  119. DACT: IFRF 3=4;SAY All direct commands react immediately when you click them, and they work with both mouse keys.
  120. DACT: IFRF 3=4;SAY Because direct commands don't check for selected objects, you should not normally use IFOBJ with them.
  121. DACT: IFRF 3=4;SAY Check out the QUIT command set up and used in this program, and how the DISABLE_QUIT: statement in graal.main has disabled the normal "q" quit key.
  122. DACT: IFRF 3=4;SAY Use this to end your adventure in a stylish way - before you give the QUIT command, you can jump to a room just containing and end-of-game screen, for example.
  123. DACT: IFRF 3=4;SAY The save and load function has been implemented in a similar way. Click the diskette to see it in action.;GOTO 3,1
  124. /*
  125. /* Layout features
  126. DACT: IFRF 3=5;SAY As you can see from the command area in this diskmag, there are almost no limits to what you can do with the layout in GRAAL 2.
  127. DACT: IFRF 3=5;SAY Note that the inventory seems to be completely gone. In fact, it's just defined in such a way that it SEEMS to be non-existent.
  128. DACT: IFRF 3=5;SAY Among other things, the inventory arrow images are small images consisting of nothing but background colour, which makes them totally transparent...
  129. DACT: IFRF 3=5;SAY ...and the minute areas still occupied by the inventory have been placed where they do not interfere with the other stuff in the command area.;GOTO 3,1
  130. /*
  131. /* EHB colours
  132. DACT: IFRF 3=6;SAY This room, and indeed most other rooms in the Herald, uses the extra half-brite mode to get 64 colours.
  133. DACT: IFRF 3=6;SAY You may notice that the colours here are not dithered, which produces a whole different "feel" to the graphics than that of the GRAAL demo adventure.
  134. DACT: IFRF 3=6;SAY One thing to remember: If the room is 64 colours, make sure the clipart graphics - including the main character - is, too!
  135. DACT: IFRF 3=6;SAY If the images you use in a 64-colour room looks "transparent" in an odd way, you have missed this important fact!
  136. DACT: IFRF 3=6;SAY Also, make sure you DO use the "EHB" mode in your paint program...;SAY ...and not a 64-colour AGA mode, which is something completely different.;GOTO 3,1
  137. DACT: EXIT
  138.  
  139. /* LINE: dlg;line_no;sentence1;sentence2| ;{cond} (This statement is optional)
  140.  
  141. /* LACT: dlg;line_no;{cond|comm} (This statement is optional)
  142.  
  143. /* ACTION: verb_no;{cond|comm} (This statement is optional)
  144. /*
  145. ACTION: -2;CLPART OlafDemo.iff;BOBS 10,11,1,1,31,47,32,0;BOBS 10,21,1,49,31,47,32,0;BOBS 10,31,1,97,31,47,32,0;CLPART OFF;SHOW 0, , , ;EXIT
  146.  
  147. /* Check if Olaf is on floor 3 and make a comment if so - triggered by
  148. /* timer device 2. Only do it once, so end this with a cancel of timer 2...
  149. /*
  150. ACTION: -1;IFOBJ 2;IFFLOOR 3;CUTSCENE 11,H;CANCEL 2;EXIT
  151.  
  152. /* Make sure to cancel timer 2 if we exit the room without having used
  153. /* floor 3...
  154. ACTION: 1;CANCEL 2
  155. ACTION: 2;CANCEL 2
  156. ACTION: 3;CANCEL 2
  157.  
  158. /* ACTION: 2 - Next page
  159. ACTION: 2;IFRF 3=1;SETRF 3=2;GOTO 5,1
  160. ACTION: 2;IFRF 3=2;SETRF 3=3;GOTO 5,1
  161. ACTION: 2;IFRF 3=3;SETRF 3=4;GOTO 5,1
  162. ACTION: 2;IFRF 3=4;SETRF 3=5;GOTO 5,1
  163. ACTION: 2;IFRF 3=5;SETRF 3=6;GOTO 5,1
  164. ACTION: 2;IFRF 3=6;SETRF 4,1=2;GOTO 4,1
  165.  
  166. /* Activating the table clock...
  167. /*
  168. ACTION: 5;IFOBJ ROBJ1;IFRF 4=0;MOBJ;SAY The time is #TIME.;CBOB 11;SAY That message contained a special string showing the time, and it was formatted according to the TIME_FORMAT: statement in the graal.main file...;CMOVE 70,157,P
  169. ACTION: 5;IFOBJ ROBJ1;IFRF 4=0;SAY Let's test the current time. First, I'll set the clock to 0:00...;SETTIME 0,0;SAY ...now click the table clock. You will get different messages depending on whether you click it before 0:15 or after!;SETRF 4=1;EXIT
  170. ACTION: 5;IFOBJ ROBJ1;IFRF 4=1;IFTIME <015;SAY Yes, it's not yet a quarter past!
  171. ACTION: 5;IFOBJ ROBJ1;IFRF 4=1;IFTIME >010;SAY I think it's already a quarter past or more!
  172. ACTION: 5;IFOBJ ROBJ1;IFRF 4=1;SAY The clock is run by a timer, started in room 1 with a DOAFTER command.;SAY The ACTION: statement triggered by the timer is placed in graal.main so that it works in every room.
  173. ACTION: 5;IFOBJ ROBJ1;IFRF 4=1;SAY It contains an ADDTIME command that adds five minutes to the clock every time the timer elapses.;SAY That's it! Now all you have to do is think about ways to use times and dates in your adventure... or not.;GOTO 3,1
  174.