mob/proc/_CD(Name,Cooldown,obj/Object)
if(!_Cooldowns)_Cooldowns=new
if(_Cooldowns[Name]&&_Cooldowns[Name]>world.timeofday)
if(_Cooldowns[Name]>world.timeofday+(Cooldown*3)) _Cooldowns[Name]=world.timeofday+Cooldown
usr<<"You cannot use this ability yet. ([(_Cooldowns[Name]-world.timeofday)/10] Seconds Left)"
return 1
else
Object.overlays += /obj/timer
spawn(Cooldown)
Object.overlays -= /obj/timer
_Cooldowns[Name]=world.timeofday+Cooldown
return 0
mob
verb
Space()
if(usr.byakurai)
if(usr._CD("byakurai",320,/SKILLS/Shunpo)) return 0
else
usr << "Byakurai would activate now"
Problem description:
the proc makes an overlay of a timer appear on the obj/object its asking for in the param. when i put /SKILLS/Shunpo, it gives me a runtime error with the /SKILLS/SHUNPO, any help?
_CD is supposed to take the instance of an obj as third argument, but you provide it with a (bad) type path instead.
This would hint at a fundamental misunderstanding between object(class) and instance.