Defined in Game.sc.
Region serves as a base class for
Rm. It can also be used on its own, to contain common logic that applies to several rooms.
To make a region part of a room, put the following code in the room’s init() method:
(self setRegions: MY_REGION) ; Where MY_REGION would be a script number for a script that contains a public Rgn instance.
Defined in Region:
Override this method to provide any custom initialization needed for your Rgn. Make sure you call (super:init()), or your region won’t be added to the current room’s regions.
This is commonly overridden in Rgn instances to provide custom logic that gets executed every game cycle.
This is commonly overridden in Rgn instances to handle keyboard or mouse events.
This is commonly overridden in Rgn instances to code custom logic for verbs.
setScript(theScript [sendParams ...])
This attaches a
Scriptto the Rgn.
- theScript (heapPtr) – A Script instance.
- sendParams – Any additional parameters needed to initialize the script.