ProceduralNodeSpawnEntities
Inherits: ProceduralNode < Resource < Shared < Object
Makes an ECS entity at each point, without a node.
Description
Section titled “Description”Thousands of things with simple logic (critters, pickups, particles that matter): one entity of the default ECS world per point, with the Grost structs of components as components, moved by ECS systems (ECS.world().system(...)). Each field of a component gets a value of the point: an attribute with the field’s name; otherwise position, rotation, scale, density, seed or color of the point, in the world (entities have no parent); the x, y and z of position_component get where the point is; the other fields keep their default value.
The structs must be known when the generator runs: declare them in a script of the scene or in a .component.gro file. Entities are made only in the game, not in the editor, and they go with what made them (generating again, Clear, a cell left far).
Properties
Section titled “Properties”| Type | Name | Default |
|---|---|---|
[]String | components | PackedStringArray() |
| StringName | position_component | &"Position" |
Property descriptions
Section titled “Property descriptions”components
Section titled “components”[]String components = PackedStringArray()
Setter/getter: set_components(), get_components()
The names of the Grost structs each entity gets.
position_component
Section titled “position_component”StringName position_component = &"Position"
Setter/getter: set_position_component(), get_position_component()
The component whose x, y and z fields get where the point is.