Script Classes for Adventure Games/Cage Class

From SCI Wiki
Revision as of 02:00, 11 December 2015 by Andrew Branscom (talk | contribs) (→‎Properties)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Official SCI Documentation

Chapter: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14
15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | Index


The Cage Class

Author: Jeff Stephenson

Date: 5 April 1988

 


The Cage Class

The Cage class implements ability to keep Actors in a rectangular region.

In file: actor.sc
Inherits from: Block
Inherited by: none


Properties

top
bottom
left
right

The bounding coordinates of the enclosing Cage.


Methods

init:

Add the Cage to the set of blocks for the current room and enable the Cage.

doit: actor

Return TRUE if actor is inside of the Block (and is thus in a legal position) or FALSE if it is outside the Cage (and thus must be moved back in). This is called in each Actor's canBeHere: method.

dispose:

Delete the Cage from the set of blocks for the current room and dispose of it if it is a dynamic instance.

enable:

Set the active property of the Cage to TRUE, so that Actors cannot leave it.

disable:

Set the active property of the Cage to FALSE, so that Actors can leave it.

 

Notes


 

Table of Contents

 

< Previous: The Block Class Next: The Sound Class >