ID:165537
 
okay im having a hell of a time trying to figure out how to flick() an overlay thats attached to my mob, Is this possible?!?!?!?! Or what am i doing wrong....

My overlay is added by a icon..

usr.overlays+=icon('head1.dmi')


Okay and.. my verb is set like this....

mob/verb/attack()
flick("attack",src)
//Whatever here... that hits.


Okay so basically whats happening.. is i attack and the head dissapears.. and is there again when the flick is done.. and i have the same icon_state for the head as i do for the body (named the same i mean) so why doesnt this work?
I think your flicking the player's Icon_state not the overlay's, not sure how to do that but I'm sure that its the problem
In response to KirbyAllStar
when i flick the icon_state for the mob it should flick it for the overlay auto i thought.... since thats what happens when you change a persons icon_state... the overlay goes with it..... so.. if it doesnt do that what should i do if anyone knows?
In response to Bladeshifter
mob/verb/attack()
flick("attack",usr)// make a new icon about the same flick but with the over lay
//Whatever here... that hits.


All you need to do is make a new icon with the overlay its about icons not codes.
In response to Miran94
Seriously Miran, stop telling people what to do... you obviously don't have a clue. -_-

Anyways, you are correct blade in [link] .. since it doesn't work, did you double checked if the icon)state was spelled properly and/or there's not more than one state with the same name?

- GhostAnime
1. Don't use the icon() instruction unless you need to modify the icon. The icon() proc creates an /icon datum which pretty much allows you to modify icons on the fly. A good alternative would be the image() instruction: it creates an /image datum which only references to the icon. You can't modify the icon itself with it, but for your operation you don't need to.

usr.overlays+=image('head1.dmi')


2. The flick() proc SHOULD change the icon_state of both the overlays and the base object temporarily. Your code should thus change both the state of the head and the body. One of the reasons the head may be going invisible is because you don't have an "attack" state defined in the .dmi or you mistyped it. If this is not the case, this could be a BYOND bug.