ID:161450
 
How can a make a weapon shoot. No ammo, just like damage + projectile movemnt
oh no one's gonna help you they'll just say 'dm guide, dm guide, read the freaking dm guide.'
obj/Shoot
//icon = 'icon.dmi'
name = "Shooot"
Bump(A)
if(ismob(A))
var/mob/M = A
var/mob/O = src.Owner
var/Damage = 500 //might define with owner's strength or anything
M.HP -= Damage
view() << "[M] got hit by [O]'s weapon shot for [Damage] damage."
M.Death(O)
mob/verb/Shoot()
var/obj/Shoot/O = new()
O.Owner = usr
walk(O,usr.dir)
mob/proc/Death(mob/T)
world<<"[src] has been killed by [T]!"
del(src)
In response to Eternal Desire
I helped, I hope. XD
In response to Eternal Desire
And why do you think people say that?
In response to Sokkiejjj
Thanks sokk :)
In response to Jujitsubb777
Er.. I keep getting this message.. :(?

obj.dm:74:error:O.Owner:undefined type: O.Owner
obj.dm:75:error:O:undefined type: O
obj.dm:73:error:O :unknown variable type
obj.dm:67:error:src.Owner:undefined var

---.dmb - 4 errors, 0 warnings (double-click on an error to jump to it)<dm>
Any suggestions?
In response to Eternal Desire
Just because you didn't understand what they were saying doesn't mean everyone else won't understand.
In response to Jujitsubb777
Jujitsubb777 wrote:
Er.. I keep getting this message.. :(?

obj.dm:74:error:O.Owner:undefined type: O.Owner
> obj.dm:75:error:O:undefined type: O
> obj.dm:73:error:O :unknown variable type
> obj.dm:67:error:src.Owner:undefined var
>
> ---.dmb - 4 errors, 0 warnings (double-click on an error to jump to it)<dm>
> Any suggestions?

are you using zeros? or O's?
In response to Angelex21
Well, look at this.


O // that is an O as in o.

0 // that is a zero.

/*The difference between the two is
that the zero is thinner than the o.
projectile
parent_type = /obj
New(loc, dir, speed = 5, range = -1)
.=..()
walk(src, dir, speed)
if(range > 0) spawn(speed * range) del src
Bump(atom/movable/A)
... //perform your damage checking and whatnot here

mob/verb/fire_projectile() new/projectile(loc, dir, range = 4)


Exercise #1: add actual weaponry with ammunition.
Exercise #2: perform damage checking, but not only on mobs, but objects too. Perhaps a fence can be destroyed with a powerful enough blast?

-- Data