ue4-rts
ue4-rts copied to clipboard
Regenerating Resource Sources
Suggested by Chosker: Resource deposits that can regenerate but have an upper limit.
Suggested by SinineSiil: More complex variant of this would be Tiberium trees in C&C series. They regenerate resources in a circular area around them.
Hey, would this approach be acceptable?:
- Create RegenerationFactor variable
- On Tick check if current resources less than max and regenerationFactor greater than 0
- If so, reuse logic from ConstructionSiteComponent to increase current resources (clamp max)
- Broadcast OnResourcesChanged
For regenerating resources in circular area, we could create a new task (this could also contain tree growing (from small to large with increasing resource size etc).
What do you think?
Yeah, sounds about right :)