Page 1 of 1
How do I make structures produce metal/energy
Posted: 13 Nov 2013, 17:09
by The_Igishly_Co
Okay, so I've got the builder unit, and now I need assistance with another thing, I've got a structure that I would like to produce resources, and anyone tell me what variables I need to modify for this to work?
Re: How do I make structures produce metal/energy
Posted: 13 Nov 2013, 17:19
by smoth
by resources do you mean energy and metal or a custom lua one.
if you mean the spring energy and metal:
energyMake = 0,
metalMake = 0,
A the top of the forum is the wiki:
http://springrts.com/wiki
for game development in the engine using the base engine stuff, like energy and metal there are several built in tags for the unit definition files.
see them here:
http://springrts.com/wiki/Gamedev:UnitDefs
until you start writing gadgets and widgets(extending than the baseline engine features). You will want to book mark here:
http://springrts.com/wiki/Gamedev:Main
and expect to spend a lot of time there
Re: How do I make structures produce metal/energy
Posted: 13 Nov 2013, 21:35
by The_Igishly_Co
"if you mean the spring energy and metal:
energyMake = 0,
metalMake = 0,"
Okay, but will that pertain to a true/false? Or will it refer to a value? And can I modify that value?
Re: How do I make structures produce metal/energy
Posted: 13 Nov 2013, 21:41
by Silentwings
The wiki can tell you this
http://springrts.com/wiki/Gamedev:UnitDefs
knorke wrote:A the top of the forum is the wiki...and expect to spend a lot of time there
Re: How do I make structures produce metal/energy
Posted: 13 Nov 2013, 21:50
by smoth
The_Igishly_Co wrote:"if you mean the spring energy and metal:
energyMake = 0,
metalMake = 0,"
Okay, but will that pertain to a true/false? Or will it refer to a value? And can I modify that value?
the wiki wrote: float metalMake Default: 0.0
The amount of the metal resource the unit generates unconditionally per game 'tick'.
What this means is that metalMake is in the engine as a float. This means it has the number range of a float. So if you were to put
1, it would give you
1 per 'tick.'