ID:149984
 
Listen, I'm making a DBZ Game...however, it's my own graphics, own style, my world (Not DBZ: NN or DBZ: Genesis) so can you help me out?

1. Lol, this is kinda funny but(t) it needs to be fixxed. :P . Everyone runs around naked! I made some pants but they don't work. Here's what I put...

obj/Pants
icon='Pants.dmi'
verb
Get()
set src in oview(0)
usr.contents+=new/obj/Pants
del(src)
Drop()
set src in usr.contents
src.Move(usr.loc)
Wear()
set category = "Clothes"
overlays += 'Pants.dmi'
Remove()
set category = "Clothes"
overlays -= 'Pants.dmi'
They Worked when i checked.
In response to SSJ4_Gohan_Majin
SSJ4_Gohan_Majin wrote:
They Worked when i checked.


Maybe it's the player icon I made that didn't allow it because of the......hey. I might get it. Hold on...
:( Still won't work for me and I just changed the player's density thingy....oh well. Back to work. :(
In response to Sajai
Make the pants an object and set the object's layer to above the mob;

obj/pants
icon='pants.dmi'
layer=MOB_LAYER+1//sets the layer above the mob


Now, when adding the overlay do it like this:

usr.overlays+=/obj/pants
In response to Nadrew
Nadrew wrote:
Make the pants an object and set the object's layer to above the mob;

> obj/pants
> icon='pants.dmi'
> layer=MOB_LAYER+1//sets the layer above the mob
>

Now, when adding the overlay do it like this:

> usr.overlays+=/obj/pants
>




Okay, this is what I put.

obj/Pants
icon = 'Pants.dmi'
layer=MOB_LAYER+1
verb
Get()
set src in oview(0)
usr.contents+=new/obj/Pants
del(src)
Drop()
set src in usr.contents
src.Move(usr.loc)
Wear()
set category = "Clothes"
usr.overlays+=/obj/Pants
Remove()
set category = "Clothes"
usr.overlays-=/obj/Pants

However, it'll most likely be right but...I just got 36 indention errors. Sigh....I've been working on it for a hour now. Is there a way for you and someone else to indent them? I tried everything. I know it's this indention because of the errors I get when they're fixxed don't make sence. :( Thanks anyway...
In response to Sajai
why use del(src) when you can use src.Move(usr)?
In response to Tapion1
I'm not sure if this is his reason, but one good reason is to make objects affected by world repops.
In response to Lesbian Assassin
i wasnt really talking about his problem.... just sugesting he uses that
In response to Tapion1
I know, and I told you that there is actually a very good reason someone might delete the original object and create a copy of it. The repop() command goes through the world and replaces any objects that started out on the map but have since been deleted... it has no effect on ones that have merely been moved. If you wanted a storehouse full of pants or swords or lanterns or whatever that automatically refilled every time the world is refreshed, this is the best way to do it.
In response to Lesbian Assassin
that can still be done with src.Move(usr) i use it and it works
In response to Tapion1
You use the repop() proc? I'm not talking about having the items be there again if the world is rebooted, I'm talking about repopulation the world without resetting... there may have been an update that I missed, but the last time I checked, repop() only brought back deleted things.
In response to Sajai
Sajai wrote:
Okay, this is what I put.

obj/Pants
icon = 'Pants.dmi'
layer=MOB_LAYER+1
verb
Get()
set src in oview(0)
usr.contents+=new/obj/Pants
del(src)
Drop()
set src in usr.contents
src.Move(usr.loc)
Wear()
set category = "Clothes"
usr.overlays+=/obj/Pants
Remove()
set category = "Clothes"
usr.overlays-=/obj/Pants

sajai this may sound silly but try deleting all the extra space you have (if you just copied and pasted it in there u might get the indention errors) delete all the space from MOB_LAYER+1 down to usr.overlays-=/obj/Pants
it seemed to work for me when i first started out copying and pasting, example
put pointer behind Drop() delete all spaces till it gets to look like: del(src)Drop() then reindent them ON ALL OF THE LINES I INDICATED... put them back in the order you had em though... silly but it should work :D
Well if God dammned it, the perhaps ask God to fix it!