ThingFactory
A ThingFactory and the subclass CreatureFactory may be triggered by an Event, or will trigger themselves if a player touches it. Since Zone changes can cause an event, you could for example cause a creature factory to start producing razorfish as soon as a player enters the water. The first creature spawns instantly.
Creature and thing factories use SpawnPoints (a type of NavigationPoint) as the locations to create actors. Up to 16 SpawnPoints can be associated to a given factory. SpawnPoints and creature factories are associated by giving them the same tag.
If a SpawnPoint has its Events → Event property set, it will fire that event when it spawns a creature.
By default, creature factories are covert, which means they will only spawn actors at a SpawnPoint no player can see. A creature from a factory has its event set to the factory's tag (so its death will trigger the factory).
Properties
- Actor Prototype
- The class of actors produced by this factory.
- int MaxItems
- The maximum number of active actors from this factory at any time. If it is a creature factory, new creatures will only produced either initially, or when a creature dies, to get back up to maxitems until the factory capacity is reached.
- int Capacity
- The maximum number of actors this factory can ever produce (-1 = no limit). After reaching this limit, the factory shuts down.
- float Interval
- Average time interval between spawnings.
- name ItemTag
- Tag given to items produced at this factory.
- bool bFalling
- Non-Pawn (UT) items spawned should be set to falling.
- timeDistribution
- Time distribution of items being spawned.
Value Description DIST_Constant
Constant interval (always equal to Interval) DIST_Uniform
Uniform interval (random time between 0 and 2 x interval) DIST_Gaussian
Gaussian distribution, with mean = Interval - bool bOnlyPlayerTouched
- Only player can trigger it.
- bool bCovert
- Only do hidden spawns (when no player is looking at the spawnpoint in question).
- bool bStoppable
- Stops producing when untouched.
- array<SpawnPoint> SpawnSpot[16]
- Possible start locations.
Known Subclasses
- CreatureFactory
- RandomCreatureFactory (custom)
Discussion
Dma: How do I format the DIST_* list?
Mychaeel: Depends. A (nested) table would do nicely here, I think...
Kamahl: What units are is the interval in?
Wormbo: Unless otherwise noted, time properties in Unreal are (game) seconds. For Unreal and UT (in Classic mode) one game second correpsonds to one real second. In UT200x and UT's Hardcore/Turbo modes 1.1 game seconds correspond to one real second.