ID:167362
 
I learn best by examples so can someone give me some good examples of lists with commenting. Ones that make a list then refrence stuff within the list different ways. Thanks for any help you can provide me.

Also is there a way to list certain objects in a switch menu? Like obj/attacks instead of every object in world?
This is the best I could come up with at the moment.

//Your attacks
attack
parent_type = /obj
a1
a2
a3
a4
a5
a5

mob/verb/see()
var/list/attacks = list() //your list
for(var/attack/a in world) //loop through world finding attacks
if(a) // if it exists
attacks += a // add attack to list
usr<<pick(attacks) //randomly select attack from the list