ID:261506
 
obj/light
icon='spell2.dmi'
icon_state="light"
density=1
Bump(atom/Obstacle)
if(istype(Obstacle,/obj/end))
del(src)
if(istype(Obstacle,/mob/wizard))
del(src)

Ok I need a way for when the light bumps into a wizard the wizard loses some health anyone know how this is possible.
Bump(atom/A)
if(istype(A,/obj/blahahs)||istype(A,/obj/yay))
A.Health -= 50

That should work heheh
In response to Super16
Nope try looking at the code again I have tried that already

obj/light
icon='spell2.dmi'
icon_state="light"
density=1
Bump(atom/A)
if(istype(A,/obj/end))
del(src)
if(istype(A,/mob/wizard))
A.HP-=10
del(src)
In response to Strange Kidd
Is the light moving? It can not Bump() anything unless it Move()s.
In response to Strange Kidd
Strange Kidd wrote:
Nope try looking at the code again I have tried that already

obj/light
icon='spell2.dmi'
icon_state="light"
density=1
Bump(atom/A)
if(istype(A,/obj/end))
del(src)
if(istype(A,/mob/wizard))
A.HP-=10
del(src)

And what problem do you have with this, exactly?
I'd wager you're getting "undefined var" errors at compile-time that you didn't tell us about. (Hint: When you ask for help, explain what's not working.)
If this is the case, you need to cast A to a mob:
var/mob/M=A
M.HP=max(M.HP-10,0)
spawn() M.DeathCheck() // do the death check after deleting this
del(src)

Lummox JR