ID:269029
 
Hello,


var/icon/I = new('hair.dmi')

Instead of hair.dmi i want to add my hair object

/hair/Hair

I tried replacing it with hair.dmi but that did not work.


Any ideas?
I don't actually understand what you're saying here. You need to rephrase it better so it's clear. It sounds like you're trying to use new/icon(type_path), which is bogus.

Lummox JR
In response to Lummox JR
I want to go like


var/icon/I = new(/obj/hair/Short)

but that does not work..is there a way to fix it or another way?
In response to Dranzer_Solo
If you want the icon to be the same as that of some other object, you need to make a new instance of the object and access its icon.
var/obj/hair/Short/hair=new
var/icon/I=new(hair.icon)
del(hair)
In response to Dranzer_Solo
Dranzer_Solo wrote:
I want to go like

var/icon/I = new(/obj/hair/Short)

but that does not work..is there a way to fix it or another way?

I'm curious why you thought that would work. It's very clear in the reference that icon/New() takes an icon as an argument, not a type path. You'd have to find the icon that goes with that type path, therefore, to do this.

Lummox JR
In response to Loduwijk
i already have the hair deifined


hair
parent_type = /obj
layer = MOB_LAYER
short
density = 1
icon = 'short_bottom.dmi'
New(rgb)
..()
var/icon/I = new('short_bottom.dmi')
I.Blend(rgb)
src.icon = I



but i still dont know how tp ut a type path like i said
In response to Lummox JR
gah ive looked and looked and i cannot find anything