Talvieno

foar bmrx

Apr 3rd, 2016
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. int systemMass as rndm(250,500)
  2. int planetRatio as rndm(1,10)
  3. int moonRatio as rndm(5,20)
  4. int asteroidRatio as rndm(15,60)
  5. int totalRatio = planetRatio + moonRatio + asteroidRatio
  6.  
  7. //this stuff ? yeah, it makes it so the ratio total is equal to our system mass, so we can make a long list of planety stuff
  8. double divThing = systemMass / totalRatio
  9. planetRatio *= divThing
  10. moonRatio *= divThing
  11. asteroidRatio *= divThing
  12.  
  13.  
  14. for i = 1 to planetRatio{
  15. makePlanet();
  16. }
  17. for i = planetRatio to planetRatio + moonRatio{
  18. makeMoon();
  19. }
  20. for i = planetRatio + moonRatio to asteroidRatio{
  21. makeAsteroid();
  22. }
  23.  
  24.  
  25. // you have now used up your system mass with an easily distributable selection of celestial bodies, congratulations, you are win
Advertisement
Add Comment
Please, Sign In to add comment