obj/bullet// the bullet
icon = 'bullet.dmi'
var/owner = null
var/delay = 1 // Delay, bigger slower MUSTBE above 0
var/dmg = 1// I like realism so look below
New()
src.dmg = rand(1,5)
..()
spawn(rand(10,20))// Making sure its realistic =D
if(src)
del src
Bump(atom/A)
..()
if(ismob(A))
var/mob/Mobhit = A
var/mob/Owner = src.owner
if(Mobhit == Owner)
return// No shooting ya self!
else
Mobhit.health -= src.dmg
if(Mobhit.health <= 0)
Mobhit.deathcheck()
else if(istype(A,/obj/bullet/))// if it hits amother bullet
src.loc = A.loc// Keeps it going :D
else if(A.density == 1)// otherwise
del src
mob/verb/shoot()
shoot1()
mob/proc/shoot1()
var/obj/bullet/O = new/obj/bullet(src.loc)
O.owner = src.ckey
walk(O,src.dir,O.delay)// make it move
Problem description:
I am attempting shooting right? ANd this code makes the bullet and everything but it flys over walls (dense turfs)
Anyone know hoe to make it work Because Its very annoying. especisally since I had made this for the combat part of the game =/