Adding a Background and Static Objects
Adding a Background
Let’s give our room a real background. Open pic 110, and click on Set Background. Import the following backgrond:
Then save the pic. Great, now we have what looks like a real room! However, the polygon that defines the room’s boundary is incorrect. Click on the polygon tool and then select the Default polygon in the Toolbox pane.
Drag the polygon corners so they better align with the corners of the room, then save the pic. If you want, split the polygon edges and extend the polygon a little ways up into the doorway at the back of the room.
Before running the game, go back to script 110 and change the ego’s default start location to posn(60 130), otherwise he will probably be outside the room’s polygon. Now run the game and walk around, and notice how the ego stays within the confines of the polygon, and will walk along its edges.
Note that the polygon was a Contained access polygon, which indicates the ego should stay inside the polygon. You can also add some Barred access default polygons which would be areas that the ego should avoid.
Some Static Objects with Canned Responses
< Previous: Interacting with Objects Next: The Priority Screen >