ID:144345
 
Code:
        mob/verb/Add_Penta()
for(var/obj/O in typesof(/obj/OnScreen/Battle/PentaGram))
usr.client.screen += new O
//world << 1
//world << 2

PentaGram
icon='OnScreen - Battle layers.dmi'
New()
..()
screen_loc = icon_state
_1_0/icon_state="1,0"
_2_0/icon_state="2,0"
_3_0/icon_state="3,0"
_4_0/icon_state="4,0"
_5_0/icon_state="5,0"
_6_0/icon_state="6,0"
_7_0/icon_state="7,0"
/*All icon_states needed here
theres a bunch of em. :p*/


Problem description:
I hit the verb, and well, nothing happens. I'm completely stumped. =( All the icon_states are in the format of "#,#" So I don't see how that would be a problem.

Haha. I'm just failing so hard today.
Well typesof(blah blah blah) doesn't seem to work.

I had a simple code like that but it didn't work so you have to do each one individually.

you can either go

            usr.client.screen += new obj/PentaGram/_1_0
usr.client.screen += new obj/PentaGram/_2_0

etc

or you can make a list

var/list/Pentagram = list(new obj/PentaGram/_1_0,new obj/PentaGram/_2_0/*etc*/)
for(var/obj/O in Pentagram)
usr.client.screen += new O
</dm>
In response to VcentG
Don't mislead people.

VcentG wrote:
Well typesof(blah blah blah) doesn't seem to work.

Yes, like EVERYTHING, if you don't use it properly, it won't work. ;)

Mechanois' problem relies in his loop:
for(var/obj/O in typesof(/obj/OnScreen/Battle/PentaGram))


See the 'var/obj/' part? That's the for() loop filter. That means the loop will ONLY loop threw /objs that are in 'typesof()'...however typesof() returns TYPE PATHS, not /objs! Therefore, that loop won't loop threw anything.
It seems you comprehend tha typesof() returns type paths, however happened to slip on the filter out of being used to it or something. Well, make sure to think over everything you do next time.
In response to Kaioken
<s> stupid idea made form not reading properly </s>
I'll probably go with a list. And thanks for the insight, Kaioken.