ID:156213
 
i have done a basic coding for an eace of cloth it would be and obj right heres my coding i just geused the last part i know it's wrong

obj
akasuki_suit
name = "akasuki_suit"
verb
wear()
src + icon = "Akasuki Coat.dmi"

i want it so when u right click wear it wil go on top of ur charaecter
What you're trying to do has a specific var for the mob called <small>overlays</small>. There's also a var similar to this called <small>underlays</small>. The meaning of these vars should be quite obvious. Anything in the mobs overlays is show on top of the mob, and vice versa.

Here's a specific example on what you're trying to achieve.

obj
akatsuki_suit
icon = 'Akatsuki Coat.dmi'
verb
wear()
usr.overlays += src


In response to DarkeWarrior
not 2 bad i was close i geuss thxs
In response to Jamesy577
i did the coding but it goes under the play icon instead f over how do i change it to go over the icon of the mob
In response to Jamesy577
Are you using <small>usr.overlays</small> or <small>usr.underlays</small>?
In response to DarkeWarrior
overlays so i guess i have to use underlays thxs
In response to Jamesy577
i change it and it did nothing i might be because i have done the mob icon wrong ?
In response to Jamesy577
It's supposed to be <small>usr.overlays</small>. I really don't get why it's showing it under the mob, overlays should make it work.
In response to DarkeWarrior
I'll give you a hint; the layer variable.
In response to Nadrew
so do i have to make coding to layer icons is that what u mean ?
In response to Jamesy577
Oh thanks, Nadrew.

After you set the suit's icon, add this under that line.

layer = MOB_LAYER + 5
In response to DarkeWarrior
so does that allow it so u can have up 2 5 layer?
In response to Jamesy577
No, it just means that the suit's layer is set above the mob's layer. You can have as many overlays as you want.
In response to DarkeWarrior
kk umm i know this will come up in the futrue i will ask it know cause it could be somthing i might have to add to every item um i want my cloth in the game to be a serten layer so that say they put on the akasuki coat and then put on a shirt the akasuki coat would still cover the shirt
In response to Jamesy577
Just set the shirt's layer lower than the suit's.

layer = MOB_LAYER + 5 // akatsuki suit's layer

layer = MOB_LAYER + 4 // shirt's layer
In response to DarkeWarrior
ah thxs
In response to Jamesy577
and so if i want it to go under my usr i would code it like this

obj
akasuki_suit
icon = 'Akasuki Coat.dmi'
layer = MOB_LAYER - 5
verb
wear()
usr.underlays += src
In response to Jamesy577
usr.overlays *
In response to DarkeWarrior
okay thank u very much for all your help
In response to Jamesy577
i noticed ur making a game if u want for all your help i can make u an orginal icon ?
Page: 1 2