Documentation: GhostComponent
Jump to navigation
Jump to search
Name | Type | Initial Value | Example Range | Description |
---|---|---|---|---|
Members | ||||
speed | float | 5 | pixels per second | |
new_hunt_target_check_every | int | 0 | how often do we look for targets | |
hunt_box_radius | float | 512 | ||
aggressiveness | float | 100 | if higher than relations then will attack | |
max_distance_from_home | float | 300 | how far from home can we go? | |
die_if_no_home | bool | true | if set to false will die, if it can't find home | |
target_tag | std::string | player_unit | if something else (like mortal), will attack the home | |
Custom data types | ||||
velocity | vec2 | (0, 0) | ||
Privates | ||||
mEntityHome | EntityID | where is our home? | ||
mFramesWithoutHome | int | 0 | ||
mTargetPosition | vec2 | (0, 0) | ||
mTargetEntityId | int | 0 | ||
mRandomTarget | vec2 | (0, 0) | ||
mNextTargetCheckFrame | int | 0 |
Requirements
The game crashes if an entity has this component but not a GenomeDataComponent.