NamelessName Posted May 2, 2020 Share Posted May 2, 2020 (edited) Why does my edit add numerous pig prisons when the original code spawns always 1 (when it randomly spawns). I added the original code vs the new one below. The first one is the orginal one. ------------------------ AddRoom("MandrakeHome", { colour={r=0.3,g=0.4,b=0.8,a=0.3}, value = GROUND.GRASS, contents = { countstaticlayouts= { ["InsanePighouse"]=function() if math.random(1000)> 995 then return 1 else return 0 end end, }, countprefabs= { mandrake_planted = 1, }, distributepercent = .2, distributeprefabs= { flower = 4, fireflies = 0.3, evergreen = 6, grass = .05, sapling=.5, twiggytree=0.2, berrybush=.05, berrybush_juicy = 0.025, }, } }) ------------------------------------------------------- AddRoom("MandrakeHome", { colour={r=0.3,g=0.4,b=0.8,a=0.3}, value = GROUND.GRASS, contents = { countstaticlayouts= { ["InsanePighouse"]=1, }, countprefabs= { mandrake_planted = 1, }, distributepercent = .2, distributeprefabs= { flower = 4, fireflies = 0.3, evergreen = 6, grass = .05, sapling=.5, twiggytree=0.2, berrybush=.05, berrybush_juicy = 0.025, }, } }) Edited May 2, 2020 by NamelessName Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now