I have a fire code its kind a crap but here:
mob/proc/Fire(mob/M as mob in oview(6))
if(usr.ammo<=0)//this Will cause a action if the users magic is less then 5//
usr<<"Your out of Ammo!!"
if(usr.pk<=1)
usr << "You can't shoot him!!"
else//this calls something if the if is not true//
missile(/obj/Fire,usr,M.loc)//This calls the missle proc to fire the obj defined at obj/Fire to M's loc//
M.overlays+=/obj/overlays/FireEnd//This Makes the overlay FireEnd appear over M makeing it look like he/she is on fire :)//
M.hp-=20//This takes what ever the damage var equals from M's health//
usr.ammo-=1
if(M.hp<=0)//This Makes it so something happens if M's Health drops below 0//
M.loc=locate(7,7,1)
/obj/overlays//This Makes a path called obj/overlays//
FireEnd//This Names FireEnd part of obj/overlays making its path obj/overlays/FireEnd//
icon='shoot.dmi'//This Says that FireEnd is in the icon file named Fire.dmi//
icon_state="EndFire"//This Calls the part of fire.dmi named EndFire//
layer=MOB_LAYER+1
FireStart
icon='shoot.dmi'
icon_state="Holding"
layer=MOB_LAYER+1
obj/Fire
icon='shoot.dmi'
icon_state="Moving"
But i want it to be like on tanks were it fires in a stright line all the time and no one has to be there for it to work.
Can some one plz help me
Unix
ID:150123
Dec 9 2001, 3:58 am
|
|