ID:2010287
 
(See the best response by Super Saiyan X.)
I'd like to generate an unknown number of objects at run-time. I've looked at type and typesof but I can't think of another way.

The following example doesn't work (and I wouldn't expect it to) but it helps explain what I'd like to do.

Code:
var/list/listOfBlockTypes = new list("b1", "b2", "b3")
var/list/Block/listOfBlocks = new()

for(var/blockName in listOfBlockTypes)
listOfBlocks.Add(new /Block/[blockName])




Best response
you would just be like;
var m = text2path("/block/[blockName]")
listOfBlocks.Add(new m)
ah, dang it. I missed that one. Thanks!