Page 1 of 1

Need help making an Infection mod.

PostPosted: Tue Jul 16, 2013 12:40
by Dan Duncombe
Please can I have full code on how to do this.

Let's say, I have a bunch of NodeA floating in middair. Every five seconds each NodeA should have a 0.5 chance of changing air node directly beneath it into another NodeA. Every five seconds each NodeA should have a 0.25 chance of turning any air node directly beside it into NodeA.
Now, imagine NodeA has spread to the ground. Every five seconds each NodeA should have a 0.5 chance of changing any non-air node touching it into NodeB.

PostPosted: Tue Jul 16, 2013 14:58
by tinoesroho
An ABM

PostPosted: Tue Jul 16, 2013 15:25
by webdesigner97
tinoesroho wrote:An ABM

ABM

PostPosted: Tue Jul 16, 2013 16:33
by LionsDen
If your looking for similar code, try looking in the vines mod. When I was using it, dirt with nothing underneath would sprout vines or something going down until they hit another node.

PostPosted: Tue Jul 16, 2013 16:38
by Dan Duncombe
I asked for the full code please. I have no idea how to use an abm to do it
webdesigner97 wrote:
tinoesroho wrote:An ABM

ABM

PostPosted: Tue Jul 16, 2013 18:01
by tinoesroho
I haven't coded an ABM in ages- but if you want to see a very basic "add entity/node" spawner, check out my Vombie Spawner. Or, heck, check out the moonrealm mod, which has "atmosphere" and "leaking".

PostPosted: Tue Jul 16, 2013 21:03
by Jordach
I'll have a crack tomorrow.

PostPosted: Tue Jul 16, 2013 21:56
by Dan Duncombe
Thankyou loads!
Jordach wrote:I'll have a crack tomorrow.