ID:150482
 
ok im trying to make a certain enemy die when attacked, but make it go to a different place when it dies. i tried

if(M = /mob/saiba)
src.del


but that wont work can someone tell me what i need to do, or what im doing wrong please?
Jotdaniel wrote:
ok im trying to make a certain enemy die when attacked, but make it go to a different place when it dies. i tried

if(M = /mob/saiba)
src.del

Well, deleting it won't make it go to a different place; it'll just delete it. I suggest you use src.Move(new_location) or src.loc=new_location. However I'm not clear on whether the M and the src are supposed to represent the same mob or different ones; in any case the if should look more like:

if(istype(M,/mob/saiba))

Lummox JR
In response to Lummox JR
thanks man
Jotdaniel wrote:
ok im trying to make a certain enemy die when attacked, but make it go to a different place when it dies. i tried

if(M = /mob/saiba)
src.del


but that wont work can someone tell me what i need to do, or what im doing wrong please?

Jotdaniel, just wanted to give you two tips to give you a better chance of having your questions answered in the forum.

First, try to give your posts topic names that have to do with the problem, instead of just "I need help." Many of us don't bother reading this sort of non-specific topic. Second, you should give more detail than just "that won't work." You should let us know if you are getting an error message, or if it is just performing in some strange fashion.

I know you already got this post answered... just thought I'd help out for your future posts.

/mob/skysaw
In response to Skysaw
i know, i just couldnt think of a name to fit my problem, and no there was no error message it just didnt work, it didnt do anything