ID:165211
 
The title might not exsplain what i want to know what to do..
So here goes.

I know its possible, But, I dont remeber how to do this..
I have one icon with allot of icon states,
I want to make lots of stuff in my game out of that icon,
Just changing the icon stae in the code...
Its confusing me,
I've seen it in a demo before,
I just dont remeber it..

So can anyone tell me how to do it?

Something like this...

obj
Furnicher
icon = 'Furni.dmi'
icon_state = "BED"
name = "Bed" // Thats the bed made..
name = "Tv"
icon_stae = "TV"


Im way off there...
But i want something like that....

Help please..

- Bevan
turf
icon = 'furniture.dmi'
furniture
bed
icon_state = "bed"
table
chair
icon_state = "chair"
TV
icon_state = "TV"

In response to Xx Dark Wizard xX
Thanks,

You fixed my shop problem!

=]

My code is working now.

Thank you!

- Bevan
In response to BEVAN
No problem, DM uses a tree trunk style way of doing things. And the reason I made them turfs is because they don't need all the extra obj vars. As long as your TV doesent walk they will be fine as turfs :)
In response to Xx Dark Wizard xX
Yeah, that's some good use of it. Note though that it's better to have the icon set on the turf/furniture type and subtypes, rather than all the turfs having it as default as in your posted code example:
turf
//icon = 'generic.dmi' //default icon for ALL turfs
furniture
icon = 'furniture.dmi' //default icon just for types of turf/furniture
bed
icon_state = "bed"
table
chair
icon_state = "chair"
TV
icon_state = "TV"


Changing /objs to /turfs if additional /obj properties are unneeded is also a wise suggestion. :) Something to consider may be that you can only truly have 1 turf on a tile, which may hamper some functionality.