Difference between revisions of "Adding a Background and Static Objects"

From SCI Wiki
Jump to navigationJump to search
Line 22: Line 22:
  
  
W
+
==<br /> Adding a Background ==
  
==<br /> ==
+
Let’s give our room a real background. Open pic 110, and click on ''Set Background''. Import the following backgrond:
 +
 
 +
<div align="center">[[File:RoomBackground.png]]<br />
 +
&nbsp;</div>
 +
 
 +
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 [[File:polygon.png]] 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.
 +
 
 +
<div align="center">[[File:DragPolygon.png]]<br />
 +
&nbsp;</div>
 +
 
 +
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.
 +
 
 +
 
 +
==<br /> Some Static Objects with Canned Responses ==
  
  

Revision as of 21:28, 26 February 2016

SCI Tutorials

Chapter: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12


Adding a Background and Static Objects
Author: Phil Fortier



Adding a Background

Let’s give our room a real background. Open pic 110, and click on Set Background. Import the following backgrond:

RoomBackground.png
 

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 Polygon.png 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.

DragPolygon.png
 

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 >