ID:139231
 
Code:
obj
Arrow1
icon='Arrow.dmi'
screen_loc="9,10"
layer=HUD_LAYER
New(client/C)C.screen+=src
Arrow2
icon='Arrow.dmi'
screen_loc="10,10"
layer=HUD_LAYER
New(client/C)C.screen+=src
Arrow3
icon='Arrow.dmi'
screen_loc="11,10"
layer=HUD_LAYER
New(client/C)C.screen+=src
Arrow4
icon='Arrow.dmi'
screen_loc="12,10"
layer=HUD_LAYER
New(client/C)C.screen+=src

var
const
HUD_LAYER=MOB_LAYER+200

mob/var
obj/Arrow1/A1
obj/Arrow2/A2
obj/Arrow3/A3
obj/Arrow4/A4
ShadowSparing=0
mob
verb
Shadow_Train()
set category="Training"
if(usr.ShadowSparing) return
usr.A1=new(usr.client)
usr.A2=new(usr.client)
usr.A3=new(usr.client)
usr.A4=new(usr.client)
usr.A1.icon_state="[pick("NORTH","SOUTH","EAST","WEST")]"
usr.A2.icon_state="[pick("NORTH","SOUTH","EAST","WEST")]"
usr.A3.icon_state="[pick("NORTH","SOUTH","EAST","WEST")]"
usr.A4.icon_state="[pick("NORTH","SOUTH","EAST","WEST")]"
usr<<"train"
usr.ShadowSparing=1



client
North()
if(usr.ShadowSparing)
if(usr.A1.icon_state=="NORTH")
usr.A1.icon_state="[usr.A1.icon_state]1"
usr.dir=NORTH

else
if(usr.A2.icon_state=="NORTH")
usr.A2.icon_state="[usr.A2.icon_state]1"
usr.dir=NORTH
else
if(usr.A3.icon_state=="NORTH")
usr.A3.icon_state="[usr.A3.icon_state]1"
usr.dir=NORTH
else
if(usr.A4.icon_state=="NORTH")
usr.A4.icon_state="[usr.A4.icon_state]1"
usr.dir=NORTH
del(usr.A1)
del(usr.A2)
del(usr.A3)
del(usr.A4)
usr.ShadowSparing=0
else
del(usr.A1)
del(usr.A2)
del(usr.A3)
del(usr.A4)
usr.ShadowSparing=0
else
..()
South()
if(usr.ShadowSparing)
if(usr.A1.icon_state=="SOUTH")
usr.A1.icon_state="[usr.A1.icon_state]1"
usr.dir=SOUTH
else
if(usr.A2.icon_state=="SOUTH")
usr.A2.icon_state="[usr.A2.icon_state]1"
usr.dir=SOUTH
else
if(usr.A3.icon_state=="SOUTH")
usr.A3.icon_state="[usr.A3.icon_state]1"
usr.dir=SOUTH
else
if(usr.A4.icon_state=="SOUTH")
usr.A4.icon_state="[usr.A4.icon_state]1"
usr.dir=SOUTH
del(usr.A1)
del(usr.A2)
del(usr.A3)
del(usr.A4)
usr.ShadowSparing=0
else
del(usr.A1)
del(usr.A2)
del(usr.A3)
del(usr.A4)
usr.ShadowSparing=0

else
..()

East()
if(usr.ShadowSparing)
if(usr.A1.icon_state=="EAST")
usr.A1.icon_state="[usr.A1.icon_state]1"
usr.dir=EAST
else
if(usr.A2.icon_state=="EAST")
usr.A2.icon_state="[usr.A2.icon_state]1"
usr.dir=EAST
else
if(usr.A3.icon_state=="EAST")
usr.A3.icon_state="[usr.A3.icon_state]1"
usr.dir=EAST
else
if(usr.A4.icon_state=="EAST")
usr.A4.icon_state="[usr.A4.icon_state]1"
usr.dir=EAST
del(usr.A1)
del(usr.A2)
del(usr.A3)
del(usr.A4)
usr.ShadowSparing=0
else
del(usr.A1)
del(usr.A2)
del(usr.A3)
del(usr.A4)
usr.ShadowSparing=0

else
..()
West()
if(usr.ShadowSparing)
if(usr.A1.icon_state=="WEST")
usr.A1.icon_state="[usr.A1.icon_state]1"
usr.dir=WEST
else
if(usr.A2.icon_state=="WEST")
usr.A2.icon_state="[usr.A2.icon_state]1"
usr.dir=WEST
else
if(usr.A3.icon_state=="WEST")
usr.A3.icon_state="[usr.A3.icon_state]1"
usr.dir=WEST
else
if(usr.A4.icon_state=="WEST")
usr.A4.icon_state="[usr.A4.icon_state]1"
usr.dir=WEST
del(usr.A1)
del(usr.A2)
del(usr.A3)
del(usr.A4)
usr.ShadowSparing=0
else
del(usr.A1)
del(usr.A2)
del(usr.A3)
del(usr.A4)
usr.ShadowSparing=0
else
..()


Problem description: The problem is if first arrow is UP and second is Down and I press Down the second arrow disappear and first one stays there but i wanted it like it goes in order like 1,2,3,4 but this one goes any way the arrow is.