The start() block is called on the world element after all elements are initialized (including world). It is called even when no init() blocks exist to call.
The start() block gets called a total of one times throughout a module's execution, if it exists.
The world is not required to have a start() block, but it is strongly encouraged.
object o_thing named "thing"
{
init()
{
textln("Init thing.");
}
}
object o_ball named "ball"
{
init()
{
textln("Init ball.");
}
}
object archetype o_key
{
init()
{
textln("Init " + identity(this));
}
}
object o_key_wood : o_key named "wooden key", "key";
object o_key_silver : o_key named "silver key", "key";
world
{
init()
{
textln("Init world.");
}
start()
{
textln("All init blocks called.");
quit;
}
}
Init() — Called on context initialization, before start().
Initializing a context is wrapped in one request-response loop. The response cues that come back are the result of all init() blocks plus start(). All operations executed contribute towards the operations and function depth limits, which is TAME's soft protection against infinite loops and stack overflows. This may vary by implementation, but the author can override these in the module header.
After the context initialization, TAME does not execute the afterSuccessfulCommand() block, afterFailedCommand() block, nor the afterEveryCommand() block. Initialization does not count as a "command" executed.