ID:1138770
 
(See the best response by Jemai1.)
turf
icon='poke center.dmi'

PC1
icon_state="PC1"
PC2
icon_state="PC2"



ok, so lordandrew showed me that i can code the turfs like this, which is very useful. now i have 3 different set icons that im putting in. a poke center, poke mart, and a starter house. all are iconed and named. upon finishing the codes and compiling. i went to go map what i had just done. 2/3 (center and mart. coded properly as per DM capitalization sensitivity,[made sure of this multiple times]) are not showing up as the icons intended for use. the starter house coded the same way, however is showing up. everything matches the way its supposed to. why isn't this working??

SN: i do want to mention, using the longer code like this. it appears:
turf
PC1
icon='poke center.dmi'
density=1

icon='poke center.dmi'
icon_state="PC1"
density=0

also would like to state that there are no errors or warnings...
EDIT-- Removed my original explanation as Jamail described the indentation issue much better.

You should try doing a Clean Compile, if you haven't. Icon changes aren't picked up until you do a Clean Compile.
Best response
It seems you have no knowledge about inheritance and definition of variables.

See the following code:
turf
icon = 'center.dmi'

center1
icon_state = "c1"
center2
icon_state = "c2"

icon = 'mart.dmi'

mart1
icon_state = "m1"
mart2
icon_state = "m2"

That code will "work" but it will not do the intended behavior. Under /turf, icon was defined 2 times. It cannot have 2 icons. Only the last definition (icon='mart.dmi') will be considered and everything else (icon='center.dmi') will be ignored. The turf's under /turf will inherit this property unless you override it.

Therefore, the previous code is equivalent to the following:
turf
//icon = 'center.dmi' // overriden by icon = 'mart.dmi'

center1
icon = 'mart.dmi' // inherited from /turf
icon_state = "c1"
center2
icon = 'mart.dmi' // inherited from /turf
icon_state = "c2"

icon = 'mart.dmi' // sets /turf's icon

mart1
icon = 'mart.dmi' // inherited from /turf
icon_state = "m1"
mart2
icon = 'mart.dmi' // inherited from /turf
icon_state = "m2"


The proper way is to branch your datums appropriately.
turf/center
icon = 'center.dmi'

center1
icon_state = "c1"
center2
icon_state = "c2"

turf/mart
icon = 'mart.dmi'

mart1
icon_state = "m1"
mart2
icon_state = "m2"

That way, /turf/center/center1 and /turf/center/center2 will inherit /turf/center's properties.
In the same sense, /turf/mart/mart1 and /turf/mart/mart2 will inherit /turf/mart's properties.
the code that i had put"

turf
icon='whatever.dmi'

who
icon_state="who"
who2
icon_state="who2"

^(example)
worked for 6 previous icons that i had done... on top of an additional 26 icons. i was clearly using as i mentioned in the initial post a code that was given to me by another of your moderators...

you kno what yeah, u might be right that i have no knowledge of coding. BUT I AM LEARNING!!! so i would like if u didnt insult my intelligence... i learn as i do and what is handed to me. if that 3rd code is to work as needed then we are done here...
In response to Dipic
Dipic wrote:
EDIT-- Removed my original explanation as Jamail described the indentation issue much better.

You should try doing a Clean Compile, if you haven't. Icon changes aren't picked up until you do a Clean Compile.

i havent had to do a clean compile before. iconed and coded then compiled. and it worked fine. i will try the clean compile...
In response to Str8 D3str0y3r
Str8 D3str0y3r wrote:
Dipic wrote:
EDIT-- Removed my original explanation as Jamail described the indentation issue much better.

You should try doing a Clean Compile, if you haven't. Icon changes aren't picked up until you do a Clean Compile.

i havent had to do a clean compile before. iconed and coded then compiled. and it worked fine. i will try the clean compile...

clean compile didnt work...
It should probably be mentioned that slashes are the same as tabs, but without the indentation of a tab

turf/house
icon = ''

is the same as

turf
house
icon = ''
Ah, no. I'm not insulting you. I just stated my observation and gave you the knowledge that, I assume, you don't have at the moment. By doing so, you'll better understand the problem and avoid it in the future.
In response to Jemai1
Jemai1 wrote:
It seems you have no knowledge about inheritance and definition of variables.

See the following code:
> turf
> icon = 'center.dmi'
>
> center1
> icon_state = "c1"
> center2
> icon_state = "c2"
>
> icon = 'mart.dmi'
>
> mart1
> icon_state = "m1"
> mart2
> icon_state = "m2"
>

That code will "work" but it will not do the intended behavior. Under /turf, icon was defined 2 times. It cannot have 2 icons. Only the last definition (icon='mart.dmi') will be considered and everything else (icon='center.dmi') will be ignored. The turf's under /turf will inherit this property unless you override it.

Therefore, the previous code is equivalent to the following:
> turf
> //icon = 'center.dmi' // overriden by icon = 'mart.dmi'
>
> center1
> icon = 'mart.dmi' // inherited from /turf
> icon_state = "c1"
> center2
> icon = 'mart.dmi' // inherited from /turf
> icon_state = "c2"
>
> icon = 'mart.dmi' // sets /turf's icon
>
> mart1
> icon = 'mart.dmi' // inherited from /turf
> icon_state = "m1"
> mart2
> icon = 'mart.dmi' // inherited from /turf
> icon_state = "m2"
>

The proper way is to branch your datums appropriately.
> turf/center
> icon = 'center.dmi'
>
> center1
> icon_state = "c1"
> center2
> icon_state = "c2"
>
> turf/mart
> icon = 'mart.dmi'
>
> mart1
> icon_state = "m1"
> mart2
> icon_state = "m2"
>

That way, /turf/center/center1 and /turf/center/center2 will inherit /turf/center's properties.
In the same sense, /turf/mart/mart1 and /turf/mart/mart2 will inherit /turf/mart's properties.

your 3rd code to "properly" code the turfs didnt work. i just tried... :/ so now what??
In response to FIREking
FIREking wrote:
It should probably be mentioned that slashes are the same as tabs, but without the indentation of a tab

> turf/house
> icon = ''
>
> is the same as
>
> turf
> house
> icon = ''
>


i just tried that. didnt work...
In response to Str8 D3str0y3r
Str8 D3str0y3r wrote:
FIREking wrote:
It should probably be mentioned that slashes are the same as tabs, but without the indentation of a tab

> > turf/house
> > icon = ''
> >
> > is the same as
> >
> > turf
> > house
> > icon = ''
> >

i just tried that. didnt work...

Did you try reading any of the posts yet? That might help.
As for compiling not working:

If you have changed the type paths like I have suggested, you'll have to remove your old objects from your map because the previous type paths are no longer available.
In response to Jemai1
Jemai1 wrote:
Ah, no. I'm not insulting you. I just stated my observation and gave you the knowledge that, I assume, you don't have at the moment. By doing so, you'll better understand the problem and avoid it in the future.

well u could've worded it better. remember we are on a computer, how one hears and reads things, the comprehension is or can be different...
In response to Jemai1
Jemai1 wrote:
As for compiling not working:
If you have changed the type paths like I have suggested, you'll have to remove your old objects from your map because the previous type paths are no longer available.

He probably has an alphabetical compile problem... something redefines something later and nullifies the settings he really wants.
In response to FIREking
FIREking wrote:
Str8 D3str0y3r wrote:
FIREking wrote:
It should probably be mentioned that slashes are the same as tabs, but without the indentation of a tab

> > > turf/house
> > > icon = ''
> > >
> > > is the same as
> > >
> > > turf
> > > house
> > > icon = ''
> > >

i just tried that. didnt work...

Did you try reading any of the posts yet? That might help.

i have been reading all the posts in this set message. if not here then what other ones?
In response to Str8 D3str0y3r
Str8 D3str0y3r wrote:
FIREking wrote:
Str8 D3str0y3r wrote:
FIREking wrote:
It should probably be mentioned that slashes are the same as tabs, but without the indentation of a tab

> > > > turf/house
> > > > icon = ''
> > > >
> > > > is the same as
> > > >
> > > > turf
> > > > house
> > > > icon = ''
> > > >

i just tried that. didnt work...

Did you try reading any of the posts yet? That might help.

i have been reading all the posts in this set message. if not here then what other ones?

There is no way you read my post, because you "tried" it. My post was not something to "try". It was explaining a rule of the language.
In response to Jemai1
Jemai1 wrote:
As for compiling not working:

If you have changed the type paths like I have suggested, you'll have to remove your old objects from your map because the previous type paths are no longer available.

how u mean? the icons didnt show, therefore i never even tried to put them in. what other icons do i need to remove?? the whole map??
In response to FIREking
FIREking wrote:
Jemai1 wrote:
As for compiling not working:
If you have changed the type paths like I have suggested, you'll have to remove your old objects from your map because the previous type paths are no longer available.

He probably has an alphabetical compile problem... something redefines something later and nullifies the settings he really wants.

what does that mean??
In response to FIREking
FIREking wrote:
Str8 D3str0y3r wrote:
FIREking wrote:
Str8 D3str0y3r wrote:
FIREking wrote:
It should probably be mentioned that slashes are the same as tabs, but without the indentation of a tab

> > > > > turf/house
> > > > > icon = ''
> > > > >
> > > > > is the same as
> > > > >
> > > > > turf
> > > > > house
> > > > > icon = ''
> > > > >

i just tried that. didnt work...

Did you try reading any of the posts yet? That might help.

i have been reading all the posts in this set message. if not here then what other ones?

There is no way you read my post, because you "tried" it. My post was not something to "try". It was explaining a rule of the language.

if i didnt read it then i wouldnt have tried it. you are saying its a rule of the DM language. therefore it would have to be inputted as so? correct?
Page: 1 2