RPG Starter

by Falacy
An Open Source Demo/Game with everything you'll need to get started on your very own BYOND Game!
ID:292252
 
Could someone explain to me how "for" works? an easy explanation/demo will do. The reference is way too advanced for me :/
....

Look in Reference (F1).
for(var/mob/M in someList) world<<M That would loop through every type of /mob in a variable/list named someList, and assign each mob to the variable M one at a time, then it will output M to the world. This will include all subtypes, so any /mob/Player or /mob/Enemies (and all of their subtypes) would also be included. However, if you were to do for(var/mob/Player/P in someList), it would only include /Player and lower, so /mob/Enemies or any default /mobs would be excluded, but something like /mob/Player/Admin would still be included.