I have tried to use
flick("overlay", src)
and
flick("overlay", src.overlays)
And neither have worked, so here I am asking if it is even possible to easily flick a overlay to where it is taken off when it is over (like flick does with icon states)
ID:158883
Jun 15 2009, 6:38 pm
|
|
Is it possible at all to flick a overlay as if it were a icon state?
I have tried to use flick("overlay", src)
and flick("overlay", src.overlays)
And neither have worked, so here I am asking if it is even possible to easily flick a overlay to where it is taken off when it is over (like flick does with icon states) |
In response to Jarquille
|
|
But will that still work like the
src.overlays += /obj/hat works? Because I have a base icon, that has the attacking state, with the weapons in another file for the overlay, but whenever I try the above code (src.overlays += /obj/hat) it adds it but when I am attacking every few seconds it creates a really bad looking effect (the overlay does not match up with the attacking state and such) |
In response to VolksBlade
|
|
When you flick an atom with an icon state (e.g. flick("attack",Object)), any overlays of that atom that also have such a state name in their icon are also automatically switched to it. In other words, all you need to do is add the hat overlay by using an icon that has the same "attacking" state name as the player, and when the player is flicked, the overlay will also be flicked.
|
In response to Kaioken
|
|
Alright, thanks.
|
src.overlays += /obj/hat
or any other way for that mather, but it always refers to adding something. that something i would think is an icon ?
thus flicking an overlay , the way i see it, would be flicking the icon refered to when adding the overlay.
as an example:
anyways, thats how you should do it. instead of having flick("overlay",src) input the icon you want it to show instead.