Ok, so I implemented the script and there is animation, but it is not what I expected LOL.
Edit: I modified the drawingRoutine to a 4 and it looks a lot better...
I need some help with what the different lines in the script do...
What exactly is being desynced?
offsetmod temp 11 0 8; #desync animation of different units
Animations, without it every unit would have exactly same animation steps, and it will look very fake.
This make that each unit animation look independent of each other
Where is anim_frame coming from?
add temp anim_frame;
This is parameter to this script, there is predefined list of names that store specific script data, like:
`anim_frame` - this is global animation frame counter
`sprite_index` - this is base sprite offset in spritesheet, usually multiple of 8
`sprite_offset` - this is offset that usually change based on unit rotation
What exactly values are send to `sprite_index` and `sprite_offset` depend on current `drawingRoutine`
What is wavegen_saw doing?
wavegen_saw temp 8 8 7;
Explain this...
mul sprite_offset 8;
add sprite_offset 8;
add sprite_offset temp;
I cannot find any documentation on what these functions do, I only found a documentation thread with examples.
Exe its self is documentation, when you set verbose logging user option then it will dump all script metadata to log.
There you can find description of majority of available functions in given script.
And one fast tip: use script operation `debug_log unit "sprite_offset:" sprite_offset "sprite_index:" sprite_index;` to dump to log what exactly values script send to your script, final value returned from script will be index to current spritesheet (aka if value is `0` then it will take first sprite in it, if `1` then it will take next one).
I copied the scripted verbatim and changed the drawingRoutine after seeing Yankes reply.
It looks better, but can it be changed to only allow the bottom to be animated?
As far I know there is no "bottom", it try animate whole whole unit and because "parrot" and your unit have different layout of sprites in spritesheet you get this result.