ID:139233
 
Code:
mob/verb
HengeNoJutsu(mob/M as mob|mob in oview())
set name = "Henge No Jutsu"
set category = "Techniques"
var/oldicon=src.icon
var/oldname=src.name
var/oldiconstate=src.icon_state
var/oldoverlays=src.overlays
var/oldunderlays=src.underlays
flick('smoke.dmi',src)
src.icon=M.icon
src.icon_state=M.icon_state
src.name=M.name
src.overlays=null
src.overlays+=M.overlays
src.underlays=null
src.underlays+=M.underlays
sleep(65)
flick('smoke.dmi',src)
src.icon=oldicon
src.icon_state=oldiconstate
src.name=oldname
src.overlays=null
src.overlays+=oldoverlays
src.underlays=null
src.underlays+=oldunderlays


Problem description:
Well, saving the icon, icon_state and name in a variable seems to work fine, but saving the overlays and underlays don't seem to work out. What I want to do here is being an exact copy of the mob targetted. Thus overlays and underlays must be included. Does anyone know how I would do it with the overlays and underlays? Copying them from the mob, and saving my own before I copied the mob.

Thanks in advance.

Yours truly,
Raimo.

Overlay and Underlay are lists, not regular variables.
In response to Pyro_dragons (#1)
Pyro_dragons wrote:
Overlay and Underlay are lists, not regular variables.

I know that much aswell, that doesn't answer my question for how to store them somewhere.
In response to Raimo (#2)
Search the forums about copying lists. There should be plenty of posts about it.
In response to Pyro_dragons (#3)
The Copy() proc seems interesting.