Random drop from blocks (help please)

Gunlexify
Member
 
Posts: 30
Joined: Mon Apr 01, 2013 13:11

Random drop from blocks (help please)

by Gunlexify » Thu May 16, 2013 17:35

Lets say I want my block to drop from 1 to 4 of something, how do I do that?
Sorry for my BAD english!

Just discovered that I realy SHOULD look at the doc/lua_api.txt file...
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Thu May 16, 2013 18:03

Gunlexify wrote:Lets say I want my block to drop from 1 to 4 of something, how do I do that?

Please put this in the modding questions topic. Here is the link.
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Thu May 16, 2013 18:36

https://github.com/PilzAdam/farming/blob/master/wheat.lua#L72
Here is how I handle the drops of wheat in my farming mod.
Last edited by PilzAdam on Thu May 16, 2013 18:37, edited 1 time in total.
 

Gunlexify
Member
 
Posts: 30
Joined: Mon Apr 01, 2013 13:11

by Gunlexify » Thu May 16, 2013 18:57

PilzAdam wrote:https://github.com/PilzAdam/farming/blob/master/wheat.lua#L72
Here is how I handle the drops of wheat in my farming mod.


Thank you
Sorry for my BAD english!

Just discovered that I realy SHOULD look at the doc/lua_api.txt file...
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

by tinoesroho » Thu May 16, 2013 19:17

... the alternative is to use the sapling drop code from default.lua. Copied, modded it, used it for a block.
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 

dannydanger
Member
 
Posts: 40
Joined: Mon May 06, 2013 23:55

by dannydanger » Thu May 16, 2013 20:05

shouldn't this be in modeling general
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 11 guests

cron