So, i have a turf on the map, with the icon being an arrow, which will, on turn_change() point at whoever's turn it is.
now, I have a smooth icon animation of an arrow turning from one side to the other, with the "_ times" checked and set as 1.
But, whenever the icon state changes, it just jumps directly to the last frame, so it immediately jumps from one side to the other. Now, if I set it to continuous, it will show the animation (In a continuous loop, like it should), but it won't show any animation when I set it to 1 time.
Any ideas as to why?
ID:944086
Aug 23 2012, 11:16 am
|
|
Aug 23 2012, 1:09 pm
|
|
Are you sure you're not setting the state as a "movement state"? If you are it'll only animate when in movement.
|
What? Seriously? I've never encountered that issue before. Hell, I have other things in the same project that animate fine without being an "M" state.
|
In response to Larduck
|
|
In response to Larduck
|
|
If you have a movement state and no still state with the same name, while they have that icon_state, they'll have just the frist frame of the movement state while still and the entire state will play uppon movement.
This is why it's called a movement state. |
This is for a TURF. Not a mob. It can't move. I have an arrow that spins. icon_state "LR" shows an arrow turning form left to right. icon_state "RL" shows an arrow turning form right to left. But when I change states from one to the other, it only shows the last frame of the 9 frame animation.
|
In response to Larduck
|
|
This is for a ICON, not a turf/mob/obj/area/datum/atom. It doesn't matter if it can move, the icon reads a movement state the same no matter what you attach it to; Unless it moves the movement state will not be played to the fullest. Or at least, shouldn't.
And if you're truely having issues, it'd be nice to have more information to help you with it. Like the code in which you change the icon_state and perhaps a demonstration of how it's failing. |
I'm not sure what the loops option does, but you should just keep it indefinite and use flick().
|
In response to Kaiochao
|
|
I was going to suggest that, but I believe that he is needing the 'arrow' to change positions, flick() would make it appear to change direction but would reset it to the orriginal position.
Instead, it'd probably be better to simply create a icon and give it several directions, then a icon state per each turn. To which, you could flick() the change depending on the current direction and the direction you're changing it to, then changing the direction after the flick() to avoid the jump back. (LR - left to right | TR - top to right | RL - right to left | ect.) |