ID:146875
 
I was wondering if someone new a code or library that I could use to randomly place tiles into my map file.
Could you be more specific? I doubt this is what you're looking for:

proc/PlaceRandomTurfs()
for(var/turf/T in world)
new pick(typesof(/turf) - /turf) (T)

In response to Foomer
well I have 3 turfs that I want to use for the default of my game but I dont want to go through and place them randomly 1 by one. is there an easier way
In response to Sleinth
Sleinth wrote:
well I have 3 turfs that I want to use for the default of my game but I dont want to go through and place them randomly 1 by one. is there an easier way

Sure. You would use the pick() proc in combination with New(). For example, let's say you have a grass icon with 3 grass states called "1", "2", and "3":

turf/Grass
icon='Grass.dmi'
New()
.=..()
icon_state=pick("1","2","3")


Hopefully, this should give you an idea of what you need to do :)