How do I make structures produce metal/energy

How do I make structures produce metal/energy

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
The_Igishly_Co
Posts: 34
Joined: 10 Oct 2013, 01:56

How do I make structures produce metal/energy

Post 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?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: How do I make structures produce metal/energy

Post 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
User avatar
The_Igishly_Co
Posts: 34
Joined: 10 Oct 2013, 01:56

Re: How do I make structures produce metal/energy

Post 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?
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: How do I make structures produce metal/energy

Post 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
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: How do I make structures produce metal/energy

Post 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.'
Post Reply

Return to “Game Development”