RPG Starter

by Falacy
[Website] [Share] [Zip]
ID:292239
 
This code creates clones of the usr, but i only want it to copy the clothing not the hair as well. i tryed fixing it but it seems not to work. can you tell me where i gone wrong?

mob
proc
summoningjutsu()
if(swim)return
prejutsu()
if(paralysed||dead||addled||resting||meditating||seals||busy)return
if(cloned)
var/T=0
for(var/mob/Clone/O in world)if(O.cloneowner==usr)
T++
del O
if(!T)goto cloneless
cloned=0
usr<<output("The Ninjas you have summoned have now retreated.","infobox")
return
cloneless
if(clonedelay)return
for(var/turf/T in oview(2))if(T.density)
usr<<output("The space is too cramped to use.","infobox")
return
handseals(20,40)
if(!sealpass)return
jutsulevelup(3,shadowclone,3)
var/BL=shadowclone
summoning+=variable
if(BL<200&&summoning>=200)src<<output("<font size=2><b><font color=lime>Your Summoning Jutsu level is now level 2! You now summon 4 ninjas that are slightly stronger!","infobox")
if(BL<300&&summoning>=300)src<<output("<font size=2><b><font color=lime>You have mastered Summoning Jutsu! You now summon 6 ninjas that are much stronger!","infobox")
clonedelay=1
for(var/obj/jutsu/Clone_Jutsu/M in src)M.overlays+='timer.dmi'
for(var/obj/jutsu/Summoning_Jutsu/M in src)M.overlays+='timer.dmi'
for(var/obj/jutsu/sand/Sand_Clone_Jutsu/M in src)M.overlays+='timer.dmi'
view(8)<<output("<b>[usr]: Summoning Jutsu!","infobox")
cloned=1
buttonjam=1
spawn(10)buttonjam=0
new/obj/smoke(loc)
var/K=new/mob/Clone/summoning(locate(x-2,y,z))
K:cloneowner=usr
var/K2=new/mob/Clone/summoning(locate(x+2,y,z))
K2:cloneowner=usr
// if(shadowclone>=200)
var/K3=new/mob/Clone/summoning(locate(x,y+2,z))
K3:cloneowner=usr
var/K4=new/mob/Clone/summoning(locate(x,y-2,z))
K4:cloneowner=usr
// if(summoning>=300)
var/K5=new/mob/Clone/summoning(locate(x,y-1,z))
K5:cloneowner=usr
for(var/mob/Clone/summoning/M in oview(2))
if(M.cloneowner==usr)
M.hair=pick("Asuma","Kakashi","Deidara","Kimimaro","Neji","Naruto","Shikamaru","Dragonball Z","Berlin","Generic")//this is me trying to fix it
M.icon=pick('base.dmi','basetan.dmi','baseblack.dmi')//this works
M.dir=dir
M.moving=0
M.overlays=overlays//i think this is the problem but i dont know how to go about it?
M.animate_movement=2
M.name=name
M.village=village
M.rundelay=2
M.str=round(str/4)
if(summoning>=200)M.str=round(str/3)
if(summoning>=300)M.str=round(str/2)
M.summoning()
var/B1=new/obj/bars/healthbar(M.loc)
B1:barowner=M
B1:copy(src)
var/B2=new/obj/bars/chakrabar(M.loc)
B2:barowner=M
B2:copy(src)
spawn(600)
// for(var/obj/jutsu/Clone_Jutsu/M in src)M.overlays-='timer.dmi'
for(var/obj/jutsu/Summoning_Jutsu/M in src)M.overlays-='timer.dmi'
for(var/obj/jutsu/sand/Sand_Clone_Jutsu/M in src)M.overlays-='timer.dmi'
clonedelay=0
You would have to manually loop through the players equipped clothes to add them to the clone if you don't want all their overlays. Once you add something to the overlays list, it becomes a nearly worthless non-object.