SpawnMinerals (Harvest)

From OxeyeWiki

(Difference between revisions)
Jump to: navigation, search
 
Line 15: Line 15:
harvest.spawnMinerals(0, 0, 100)
harvest.spawnMinerals(0, 0, 100)
</pre>
</pre>
 +
 +
=== Resources ===
 +
*[http://www.oxeyegames.com/forum/viewtopic.php?p=1523#p1523 Oxeye Game Studio Forum - Harvest Functions]

Latest revision as of 22:50, 2 December 2009

spawnMinerals(x, y, amount)

Adds a new mineral patch containing 'amount' minerals. The function will attempt to stack minerals if possible, which means it will look for minerals nearby (x, y) and add 'amount' to them instead of creating a new one. The mineral's graphics will be chosen depending on the amount.

Parameter Expected Type Description
x Number The x coordinate for the mineral patch.
y Number The y coordinate for the mineral patch.
amount Number The amount of minerals in the mineral patch.
Returns

Returns nothing.

Harvest Library

Example

harvest.spawnMinerals(0, 0, 100)

Resources

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox