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.
ID:261506
May 21 2002, 3:23 pm
|
|
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 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 Lummox JR |
if(istype(A,/obj/blahahs)||istype(A,/obj/yay))
A.Health -= 50
That should work heheh