ID:174897
 
Alright, when this missle bumps an atom (person or wall) it is supposed to check for anybody in an oview of 5 and take health from them. if it hits a wall it also checks and does same effect but also! it is supposed to call a proc on the wall.

Bump(atom/A)
if(istype(A,/mob/Person))
for(var/mob/Person/P in oview(5))
P.Health -= 25
del(src)
else if(istype(A,/turf/Wall))
for(var/mob/Person/M in oview(5))
M.Health -= 25
A:Blow()
del(src)
ah when del(src) is called it ends the bump procedure. Try this:

Bump(atom/A)
var/todel = 0
if(istype(A,/mob/Person))
for(var/mob/Person/P in oview(5))
P.Health -= 25
todel = 1
else if(istype(A,/turf/Wall))
for(var/mob/Person/M in oview(5))
M.Health -= 25
A:Blow()
todel = 1
if(todel == 1)
del(src)
Crashed wrote:
Alright, when this missle bumps an atom (person or wall) it is supposed to check for anybody in an oview of 5 and take health from them. if it hits a wall it also checks and does same effect but also! it is supposed to call a proc on the wall.

Bump(atom/A)
if(istype(A,/mob/Person))
for(var/mob/Person/P in oview(5))
P.Health -= 25
del(src)
else if(istype(A,/turf/Wall))
for(var/mob/Person/M in oview(5))
M.Health -= 25
A:Blow()
del(src)

I think Do_Rushyo pretty much covered the problem, the "missile" deletes itself after doing damage to the first Person it finds, thus ending the proc and having no effect on anything. Also note that by having the Blow() proc happen for every person it encounters, the wall will take damage for every person it damages, not just once.

Try this:

<code>Bump(atom/A) if(istype(A, /turf/Wall)) var/turf/wall/W = A A.Blow() for(var/mob/Person/P in oview(src, 5)) P.Health -= 25 del(src)</code>
In response to Foomer
Do_Rushyo?

:(
In response to Foomer
Foomer wrote:
<code>Bump(atom/A) > if(istype(A, /turf/Wall)) > var/turf/wall/W = A > A.Blow() > for(var/mob/Person/P in oview(src, 5)) > P.Health -= 25 > del(src)</code>

Erm, I think you mean W.Blow(), not A.Blow().
In response to Foomer
Hah, Foomer's having a typo day. =)
In response to Crispy
apparently....
In response to Da_Rushyo
Get over it.