ID:139204
 
Code:
mob/Bump(atom/O)
if(istype(O,/obj/slime/Red_Slime)) // if its a Slime...
src.points+=1000 // adds 15 to the usr's score.
del(O) // get rid of O.
if(istype(O,/obj/slime/Blue_Slime)) // if its a Slime...
src.points+=1000 // adds 10 to the usr's score.
if(src.points>1000)
src.LevelDone()
del(O) // get rid of O


obj/Bump(atom/T)
if(src == typesof(/obj/slime/))
if(istype(T,/turf/wall2))
del(src)


Problem description:

Alright, I've been playing around with the slime Catcher's source. I thought it would be neat to add a proc into it and got into a problem.. Everything is fine until the proc is called during runtime. Once the proc is called, it starts to delete any turf I jump onto and run into. Tell m,e if you need more info.
Gtgoku55 wrote:
Code:
mob/Bump(atom/O)
> if(istype(O,/obj/slime/Red_Slime)) // if its a Slime...
> src.points+=1000 // adds 15 to the usr's score.
> del(O) // get rid of O.
> if(istype(O,/obj/slime/Blue_Slime)) // if its a Slime...
> src.points+=1000 // adds 10 to the usr's score.
> if(src.points>1000)
> src.LevelDone()
> del(O) // get rid of O
>
>
> obj/Bump(atom/T)
> if(src == typesof(/obj/slime/))
> if(istype(T,/turf/wall2))
> del(src)
>

Problem description:

Alright, I've been playing around with the slime Catcher's source. I thought it would be neat to add a proc into it and got into a problem.. Everything is fine until the proc is called during runtime. Once the proc is called, it starts to delete any turf I jump onto and run into. Tell m,e if you need more info.


I think its the last if statement in mob/Bump. Right now its saying that if a mob bumps into an atom & that mob's points are over 1000: delete the atom. So once you get over 1000 points you just start deleting anything you bump into.
In response to Turles
TY. I get it now, I'll make a few modifications to make sure I can avoid this issue.