Turf Picker

by SpikeNeedle
A way to randomly pick a turf's icon state upon world start up. [More]
To download this demo for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://SpikeNeedle.TurfPicker##version=0

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:

byond://SpikeNeedle.TurfPicker##version=0

361 downloads
Latest Version
Date added: Jul 28 2006
Last updated: Jul 29 2009
1 fan
Difficulty : Easy
Learning Curve : 1 minute

A small snippet of code showing users how to set the icon state of a turf upon world startup based on a randomly chosen list. You can decide to have less of an icon state you don't want to show too much.

Comments

Mastergamerxxx: (Dec 13 2014, 11:18 pm)
This is good but your code is a tad bugged. you loop the check mechanism which negates the probability due to the 2 to 1 ratio of rocks and flower vs grass making the success rate almost null in point. If you change the else to giving the failure a grass icon the probability is truly shown otherwise it just keeps looping upon every failure making flower and rocks not appear as low of probability as one thought.