ue4-rts icon indicating copy to clipboard operation
ue4-rts copied to clipboard

Regenerating Resource Sources

Open npruehs opened this issue 7 years ago • 2 comments

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.

npruehs avatar Oct 07 '17 14:10 npruehs

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?

JernejHabjan avatar Oct 11 '20 14:10 JernejHabjan

Yeah, sounds about right :)

npruehs avatar Feb 03 '21 17:02 npruehs