User Tools

Site Tools


builders:spawner

Spawners

This is a novel feature of the AltAway server.

A spawner will create, endlessly, new objects that are placed in the world unglued.

To create a spawner, simply set common_flags on any object to 65536 + normal value. You may be best setting INVISIBLE and IMMOBILE, so flags value would be 65539.

New object is created at (spawner coordinates with Y–) only if there is no previous object still there.

New object is created with INVISIBLE, IMMOBILE, GLUED all cleared.

Set properties on the prototype -

respawnTime - how long in seconds before respawning. Either a fixed number e.g. 10, or a range e.g. 60-120. If a range, a random number is chosen between these ranges. Default is 10-120.
spawnCheckFrequency - how often, in seconds, to check if this item needs to be replaced. Default 20.

- timing is approximate and dependent on global ticker frequency too.

Group Spawners

As an alternative, use fiddle to set an action script of “group spawner” (11) on any object. Set property spawngroup with an id. Of all spawners in the same group, only one will have an item show up. Only property respawnTime is used and works slightly differently - each individual spawner is checked this often, and only if all are empty, a new item is created. This means that the items might reappear quickly, but no less often than this setting. Make sure you use a range, so each spawner gets a random interval, so that respawns are spread out. If they are all a fixed value, it is likely they will be processed in the same order every time, and thus the same spawner will keep triggering each time.

There is no specific requirement for all spawners in a group to be identical objects…

builders/spawner.txt · Last modified: 2022/12/21 12:50 by amanda