Undefine procs and icon states in Developer Help
|
|
Code:
mob NPC/name="zombie" icon='zombie.dmi' icon_state="normal" New() var/obj/O=new/obj O.icon='zombie.dmi' src.overlays+=O ..() Death() world<<"<b><font color=red>** You killed [src] **" del(src) var/tmp obj/Pickup/Guns/weapon reloading=0 flicking=0 fired=0 kills=0 proc Reload() if(!src.weapon){src.reloading=0;return} var/i=src.weapon src<<"<i><font size=2>Reloading..." sleep(src.weapon.Reload_Time) if(!src.weapon){src.reloading=0;return} else if(i==src.weapon) var/obj/Pickup/Ammo/A=locate(src.weapon.Ammo_Path) in src.contents if(A) view(src)<<sound(src.weapon.Reload_Sound,0) var/take=src.weapon.MACapacity take-=src.weapon.ACapacity if(A.ammo<take)take=A.ammo src.weapon.ACapacity+=take src.weapon.suffix="[src.weapon.ACapacity]/[src.weapon.MACapacity]" A.ammo-=take if(A.ammo<=0)del(A) else A.suffix="[A.ammo]/[A.mammo]" src<<"<i><font size=2>...Reloaded!" sleep(10) src.reloading=0 LocateAmmo() if(!src.weapon)return 0 var/A=locate(src.weapon.Ammo_Path) in src.contents if(A)return 1 else return 0 verb ReloadGun() if(src.reloading)return if(src.weapon) if(src.LocateAmmo()) if(src.weapon.ACapacity<src.weapon.MACapacity) src.reloading=1 src.Reload() else src<<"You need more ammo." FireWeapon() src.Fire()
|
"663:error: src.Fire: undefined proc
617:error: Death: undefined proc"
How do I define these and also...
New() var/obj/O=new/obj O.icon='zombie.dmi' src.overlays+=O ..()
|
Is this code for an object to be put on top of a mob? If so then I don't want this and how would I get rid of this without any errors if this is the case?
|
I'm not entirely sure what you mean by "put on top of a mob". This piece of coding here is creating a new /obj, having its icon set to zombie.dmi, and is being applied as an overlay to the zombie. If you don't want it doing that just... remove it.
I have to ask, did you write all this yourself? Or is this from someone else's source code?