ID:163805
 
How do i make a copy of my character in the game?
what do you mean?
In response to Jman9901
I think he means making an exact duplicate of his current characer. You would spawn a mob with no pre-defined variables and then you would spawn that mob in the proc/verb and then assign variables to it. So usr.icon = spawnedmob.icon, this would give it the same icon(the icon does NOT include overlays). You would do the same thing for the rest of the variables. Spawnedmob is a random variable I thought up of so don't use it.
In response to Kakashi24142
Can u explain me some better plz¡?
In response to Moskerark
Fine, here's an example:
mob
random_mob

mob
verb
Clone_Me()
var/mob/random_mob/R = new()
if(R)//check if it exists
R.icon = usr.icon//this reads "R's icon is set to user's icon
R.icon_state = usr.icon_state
for(var/T in usr.overlays)
R.overlays.Add(T)
//the code above makes the clone look exactly the same as the user
R.str = usr.str //str variable, this is just an example so I used a random variable
//if you want the clone to have the same stats, set the clone(R)'s stat variables to the user's stat variables
In response to Kakashi24142
and how do i check if R exists?
In response to Moskerark
if(R)

That checks it.