ID:142256
 
Code:
obj
sword2
icon='sword.dmi'
icon_state="2"
sword3
icon='sword.dmi'
icon_state="3"


obj


sword
icon = 'sword.dmi'
name="Zampaktou"
verb
Wear()
if(usr.shikai)
if(usr.stype == "Ichigo")
return
if(!usr.inbankai)
if(!usr.inshikai)
if(src.worn)
src.worn = 0
usr.swordon = 0
usr.overlays -= src.icon
usr.overlays -= src.icon
usr.overlays -= src.icon
usr.overlays -= src.icon
else
src.worn = 1
usr.swordon = 1
usr.overlays += src.icon

Get()
set src in oview(1)
src.loc = usr
usr<<"You picked up a [src]"


Problem description:

hi, what im trying to do is instead of my sword being only 1 tile i want it to be a big sword with like 2 iconstates but im having troubles. iv tried diffrent ways using overlays and pixelx and pixely but its not working out properly. i want it so when u equipt the sword it makes 2 icon states , the base of the sword and the sword.any help?
Well you have to define the second overlay you want, or did you already do that? Secondly, where do you want it in relation to the mob. For instance if you want a tall sword that goes up like this, O = sword M = player X = blank space

XOX
XMX

or a wide sword
XXX
XMO
if facing east

XXX
OMX if facing west.

From what you said, I have no idea what you want, and therefore am having issues addressing what to give you.
In response to Mr.Tophat
well i want it for every direction but i want my sword to be in 2 icon states so it would actually be

MOO

O
O
M

OOM

M
O
O

all directions cuz i will have diffrent movements for the swords in each direction.
In response to Agrey123
Admittedly I'm not a BYOND guru, so the method I'm going to give you probably isn't the best one, though I've done what you need and here's what you need to do for this fix. You're going to need 8 icon_states with movement in them. In each one you will only have the direction that you're facing. So for instance in the two for the guy going east, you will leave all other movement spaces blank. Next you're going to need to create 8 overlays and move them accordingly with pixel_x and pixel_y. For instance for your east facing one again, you'll need to move the first one pixel_y+=32 and then the second pixel_y as += 64. It's going to be a fair chunk of code, but it's a simple solution. That's the only solution I can think of, I'm sure a BYOND guru will be in here shortly enough to give you better instruction, though.
In response to Mr.Tophat
yea thats what im having problems with pixely and pixelx i need like a starter code to show me exactly what to do and so i can work off it