Overlays and underlays. in Developer Help
|
|
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.
|