I was asked this question and felt I may as well make a tutorial about it. I won't be going into a lot of steps on how it's done, but since it's pretty straight forward here are all the steps to do it.
First, what gives a resource point resources is a Behavior with the Behavior Type Resource.
Minerals (Mineral Field, or High Field) are for Minerals, Gas (Raw Vespene Geyser, or Raw Rich Vespene Geyser) are the behaviors applied to the resource units. We want to modify these to make them regenerate.
To do this
1) First, make an effect. We'll call it Resource (Regen), effect type: Modify Unit.
2) Find the Effect - Resources field and set it to 1. This is the amount of resources regenerated each period.
3) Make a behavior. We'll call it Resource (Regen), Behavior Type: Buff, suggest.
4) Scroll down the field list until you find Stats - Flags, and check it so Hidden is enabled.
5) Next go to Stats - Period, and change this to the delay you want the resource to regen at. Let's say 1 second for testing.
6) Next go to Effect - Effect - Periodic, and link it to the effect we made earlier - Resource (Regen).
7) Lastly, go to the Unit -> Mineral Field and find the Behaviors + option. Add a new behavior, and Find the Behavior Resource (Regen).
You can add this to any unit now with a resource behavior to make it regenerate.
I was asked this question and felt I may as well make a tutorial about it. I won't be going into a lot of steps on how it's done, but since it's pretty straight forward here are all the steps to do it.
First, what gives a resource point resources is a Behavior with the Behavior Type Resource.
Minerals (Mineral Field, or High Field) are for Minerals, Gas (Raw Vespene Geyser, or Raw Rich Vespene Geyser) are the behaviors applied to the resource units. We want to modify these to make them regenerate.
To do this
1) First, make an effect. We'll call it Resource (Regen), effect type: Modify Unit.
2) Find the Effect - Resources field and set it to 1. This is the amount of resources regenerated each period.
3) Make a behavior. We'll call it Resource (Regen), Behavior Type: Buff, suggest.
4) Scroll down the field list until you find Stats - Flags, and check it so Hidden is enabled.
5) Next go to Stats - Period, and change this to the delay you want the resource to regen at. Let's say 1 second for testing.
6) Next go to Effect - Effect - Periodic, and link it to the effect we made earlier - Resource (Regen).
7) Lastly, go to the Unit -> Mineral Field and find the Behaviors + option. Add a new behavior, and Find the Behavior Resource (Regen).
You can add this to any unit now with a resource behavior to make it regenerate.
An Example File can be found here:
http://www.sc2mapster.com/maps/regenerate-resource/files/1-regenerate-resource/
Thanks for tutorial ;)
Thank you very much for this. Helped heaps.
This is awesome, thanks for the tutorial, it still works splendid!
Custom Campaign Initiative