ID:166235
 
How do i change a map type like say i've got Mob/Bob then i have Mob/Jack And i would want to change Bob into Jack..So Bob would use all the procs and whatnot i've set out for Jack
Do you want Bob to just become a "clone" of Jack? Or do you just want Bob to be able to do the same things as Jack? If you want Bob to become Jack completely, I guess you could do:

mob
Bob
verb/Change_to_Jack()
src.client.mob=new/mob/Jack

Jack
verb/Change_to_Bob()
src.client.mob=new/mob/Bob
In response to Seraphrevan
I ment like this Say i have a proc thats activated when a certain mob bumps Bob and i want the proc to change Bob into Jack but Neither of these are players..they are just NPCs So whould client still work in this situation?
In response to Sphinxe1
Seraphrevan wrote:
Do you want Bob to just become a "clone" of Jack? Or do you just want Bob to be able to do the same things as Jack? If you want Bob to become Jack completely, I guess you could do:

> mob
> Bob
> verb/Change_to_Jack()
> src.client.mob=new/mob/Jack
>
> Jack
> verb/Change_to_Bob()
> src.client.mob=new/mob/Bob


This should work for you, just change it around the way you want it.
In response to Dragon_fire6653
That will not work for what he wants. He says that he is using this for NPCs, not players, so client will not work here. I am not too sure if you can change types in procs/verbs as I've never attempted it but if you can, you could try that. If there were certain variables that NPCs have like let's say a target variable for some type of combat AI, then you could contain those in a list, make an enitrely new mob, then set the new mob's list to the old one, like so:

var/mob/Bob/B=new(src.loc)
B.MyList=src.MyList
del(src)

This probably wouldn't work for more advanced games that included loops that involved the NPCs and probably pathfinding...

Anyways, I hope you understood most of what I said, heh. I tend to ramble sometimes.

-Exophus