turf/grass
icon='grass.dmi'
mob/Monsters/
Rat
icon='rat.dmi'
Bat
icon='bat.dmi'
var/list/spawnlist=list(new/mob/Monsters/Rat,new/mob/Monsters/Bat)
turf
Spawn
Entered(mob/M)
if(istype(M,/mob))
var/mob/spawnpicker=pick(spawnlist)
new spawnpicker.type(src)
Problem description:
Hi there! I re-joined byond the other day and my fondness for it back in the day and overall nostalgia has happily lead me to make the leap to learn programming! Onto my issue however. My spawn works, but unfortunately, both the rats and bats spawn reoccurring-ly with every single step in the spawn zone. I've referenced the DM guide but I'm not exactly sure where I should be looking and how to mock up the code from this point to makeshift for an low probable encounter chance. I'd appreciate any senior/intermediate programming direction and or help on the matter!
You can also for probability do something like.