For this tutorial you will need AGI Studio and Picedit both available here
Step 6: Editing the First Room Logic
Load the Logic rescource for the first room (Logic.002).
Remove the following lines:
Code:// Check What room the player came from and position them // on the screeen accordingly, e.g: // if (prev_room_no == 5) { // position(ego,12,140); // }
Scroll down until you see this line:
Code:if (said("look")) { print("This is an empty room"); }
Change it so it reads:
Code:if (said("look")) { print("You are standing on a meadow which has a shack on it"); }
Add a line which reads:
Code:if (said("look","shack")) { print("There is a blue door in the shack"); }
The if (said.... Line tells the interpreter what to do if a certain word is said eg. look. These words are stored in the Words.TOK File.
Remove the following lines as well.
Code:if (ego_edge_code == horizon_edge) { // ego touching horizon new.room(2); } if (ego_edge_code == right_edge) { // ego touching right edge of screen new.room(2); } if (ego_edge_code == bottom_edge) { // ego touching bottom edge of screen new.room(2); } if (ego_edge_code == left_edge) { // ego touching left edge of screen new.room(2); }
These lines tell the interpreter to change rooms when the Ego hits the edge of the screen.
Now open the Words.TOK editor and click on add group.
This group is number "32".
Click on add word and type in Shack
Close the Words.TOK editor.
Compile the logic and run the game by pressing F10
Top
You can help keep The Sierra Help Pages and its affiliates alive by helping to defray some of the costs of hosting this site. If it has been of help to you, please consider contributing to help keep it online.Thank you.
The Sierra Help Pages | Sierra Game Help | Walkthroughs | Hints, Tips & Spoilers | Utilities | Links | SHP Forums | Search
© 2013 to present The Sierra Help Pages. All rights reserved. All Sierra games, artwork and music © Sierra.
�