Style, Added links, this is no longer a stub. |
Added field descriptions. Added sentance on what happens when there is no component of this type anywhere in the world. |
||
Line 4: | Line 4: | ||
The '''CommonSpawnArea''' component is a [[User|user]] spawner that can take a range from a [[Component:PointGenerator|PointGenerator]]. | The '''CommonSpawnArea''' component is a [[User|user]] spawner that can take a range from a [[Component:PointGenerator|PointGenerator]]. | ||
If there is no '''CommonSpawnArea''' in the [[World]], the user will spawn at the coordinates <code>0, 0, 0</code>. | |||
{{Table ComponentFields | {{Table ComponentFields | ||
|SpawnPointGenerator|IPointGenerator|A [[:Category:Components:Transform:Point Generators|PointGenerator]] component. This determines which points the spawn area will use for spawning new users. | |SpawnPointGenerator|IPointGenerator|A [[:Category:Components:Transform:Point Generators|PointGenerator]] component. This determines which points the spawn area will use for spawning new users. | ||
|FloorPointRay|Float3| | |FloorPointRay|Float3| Shoots a ray from the slot containing this component and trys to detect a floor | ||
|OtherUserCheckRadius|Float|A minimum of how far away other users must be before a spawn point generated by SpawnPointGenerator is valid. | |OtherUserCheckRadius|Float|A minimum of how far away other users must be before a spawn point generated by SpawnPointGenerator is valid. | ||
|ParentUser|Bool|If true, newly-spawned users will be parented to the slot holding this component. | |ParentUser|Bool|If true, newly-spawned users will be parented to the slot holding this component. | ||
Line 13: | Line 15: | ||
|ScaleUser|Bool|If true, newly-spawned users will be scaled to be the same scale as the slot holding this component. This can cause issues with parenting, so take care. | |ScaleUser|Bool|If true, newly-spawned users will be scaled to be the same scale as the slot holding this component. This can cause issues with parenting, so take care. | ||
|Capacity|Int|The maximum number of users that can be spawned in the slot holding this component at any given time. A value of -1 makes the maximum unlimited. | |Capacity|Int|The maximum number of users that can be spawned in the slot holding this component at any given time. A value of -1 makes the maximum unlimited. | ||
|BaseWeight|Float| | |BaseWeight|Float| The chance this spawner will be used to spawn users. The higher the number, the more likely the chance. | ||
|PositionNode|UserNode| | |PositionNode|UserNode| Positions the user based on this body node. | ||
|RotationNode|UserNode| | |RotationNode|UserNode| Rotates the user based on this body node. | ||
}} | }} | ||
Revision as of 05:11, 27 September 2024
The CommonSpawnArea component is a user spawner that can take a range from a PointGenerator.
If there is no CommonSpawnArea in the World, the user will spawn at the coordinates 0, 0, 0
.
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. |
SpawnPointGenerator
|
IPointGenerator | A PointGenerator component. This determines which points the spawn area will use for spawning new users. |
FloorPointRay
|
Float3 | Shoots a ray from the slot containing this component and trys to detect a floor |
OtherUserCheckRadius
|
Float | A minimum of how far away other users must be before a spawn point generated by SpawnPointGenerator is valid. |
ParentUser
|
Bool | If true, newly-spawned users will be parented to the slot holding this component. |
OrientUser
|
Bool | If true, newly-spawned users will be oriented towards the Z- axis that the slot holding this component is facing. |
ScaleUser
|
Bool | If true, newly-spawned users will be scaled to be the same scale as the slot holding this component. This can cause issues with parenting, so take care. |
Capacity
|
Int | The maximum number of users that can be spawned in the slot holding this component at any given time. A value of -1 makes the maximum unlimited. |
BaseWeight
|
Float | The chance this spawner will be used to spawn users. The higher the number, the more likely the chance. |
PositionNode
|
UserNode | Positions the user based on this body node. |
RotationNode
|
UserNode | Rotates the user based on this body node. |
Usage
Unlike other user spawner components, the CommonSpawnArea component allows you to use a PointGenerator component to define an arbitrary area in which users can spawn from. This gives you more granular control over a spawn area than SpawnArc.