Create a resource node

Project: Armament
Role: Game Programmer
Completed: 23.12 Pfc Felipe Wagner Game Programmer
Start Date: 5/10/2018 20:48
End Date: 5/25/2018 09:04

Set a value for wealth/oil so we have something to reference from.  The player should start with X amount of resources.  Make this value adjustable for the designer in unity.


We need a resource node that our support units could "mine"  This nod should have X amount of at the start of the game.  
We also want the resource to become "drained" or destroyed when that value is less than 1

Complete Task
1.50 HR.
I have uploaded an Unity Package with the code and sample scene since I'm having issues with the MCU at the time.

Script and Sample Scene for the Resource Node.
  • Can set resource type (Wealth/Oil)
  • Can set starting capacity of the node
    • Log Error if Capacity < 0
  • Can set onMined and onDrained events
  • Change the mesh of the node when drained (It's a second script linked on the onDrained event. This script might be used to change the mesh of units when they get destroyed too.)
  • Sample Scene with UI elements to set the Team Id of the unit mining the node, a button to mine the node once and text elements to debug the node and events info.

I believe that's all for this agenda. If I let anything out or you need any adjustments please let me know.

Best wishes,


All resources can be mined?
  1. Morale
  2. Oil
  3. Power
  4. Wealth

I think the resource node is a simple one. It can have a script with a Capacity and a Type only. When the mining unit is near the node it starts to extract the resources from the capacity until it reaches zero and becomes drained. We can link events like OnDrained, OnMining, OnDestroyed, ... to change the model, play sounds/effects or something else.

@Felipe that sounds like a good idea.  I was thinking something simple.  As for which resources get mined, Oil and Wealth i believe.  Refer here for more information

@felipe would you like to get started on this agenda?  We are in a position where we can get this handled.  If you have any questions or concerns feel free to message a lead or a producer!  :) 

Hey @Jono, I still having issues with the MCU.
I will upload an unitypackage with the code and sample scene, ok?

With the fix to MCU can I have you put this into TFS using MCU please.

I'm downloading the project and will do that.

I think I did it. Just need to Check In using the MCU, right? Please let me know if it worked.

Yes please do a check in.  Everything should be under the agenda folder id of this agenda which is 1762 so I can review it.

It's all under Sandbox/Felipe_RochaWagner/1762
I did the check in already.

Thank you very much