m ProbablePrime moved page RandomObjectSpawner (Component) to Component:RandomObjectSpawner: Creating component Namespace |
Re-add bulldozed description |
||
(One intermediate revision by the same user not shown) | |||
Line 15: | Line 15: | ||
}} | }} | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|Templates| | |Templates|{{RootFieldType|SyncList`1|[[#SpawnData|SpawnData]]}}|TypeAdv0=true| List of slots to be selected from, when a Trigger is invoked | ||
| | |SpawnSpace|{{RootFieldType|RootSpace}}|TypeAdv1=true| The space in which the template item will be spawned. | ||
}} | }} | ||
== Behavior == | == Behavior == | ||
When triggered by any event source that accepts an Action (for <code>Spawn()</code>), or Action<float3> (for <code>SpawnAtPoint()</code>, this component will spawn a random slot from <code>Templates</code> | When triggered by any event source that accepts an Action (for <code>Spawn()</code>), or Action<float3> (for <code>SpawnAtPoint()</code>, this component will spawn a random slot from <code>Templates</code> | ||
Line 32: | Line 31: | ||
== Related Components == | == Related Components == | ||
</translate> | </translate> | ||
[[Category:Components{{#translation:}}| | [[Category:Components{{#translation:}}|Random Object Spawner]] | ||
[[Category:Components:Transform{{#translation:}}| | [[Category:Components:Transform{{#translation:}}|Random Object Spawner]] | ||
[[Category:Components With Nested Types{{#translation:}}|Random Object Spawner]] | |||
[[Category:Triggers]] | [[Category:Triggers]] |
Revision as of 21:14, 3 March 2024
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
Intoduction
The RandomObjectSpawner component selects a slot from the Templates
list, and spawns it either at this component's parent (in the case of Spawn()
), or at the point specified in an argument (in the case of SpawnAtPoint()
)
Usage
Name | Arguments | Description |
---|---|---|
Spawn()
|
None | Spawns a slot randomly selected from Templates , located at the origin of this component's parent slot.
|
SpawnAtPoint()
|
Float3 | Spawns a slot randomly selected from Templates , located at the position specified in the Float3 argument
|
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. |
Templates
|
list of SpawnData | List of slots to be selected from, when a Trigger is invoked |
SpawnSpace
|
direct RootSpace | The space in which the template item will be spawned. |
Behavior
When triggered by any event source that accepts an Action (for Spawn()
), or Action<float3> (for SpawnAtPoint()
, this component will spawn a random slot from Templates
The Spawn()
trigger can be invoked by a component such as Button Action Trigger, when bound to a UIX Button or Legacy Button
The SpawnAtPoint()
trigger can be invoked by a component such as Character Event Trigger, which provides the required Float3 argument.
Prior to Build 2020.11.8.605, this component would duplicate a random slot from Templates
in-place, without changing its location.