side by side
lines around each change
Show the changes in full context
White space changes
2010-06-05 01:31:47 (
A sound effect plays at "event", as before. Also, if there is an ammunition prop then it is hidden at the "event" point, and made visible again at the "load" point (a fraction through the animation, defined in the actor XML). An ammunition prop is one that's attached to a prop point called ''loaded-r_hand'' (or ''loaded-'' with any other valid prop point instead of ''r_hand''). It doesn't matter if "load" comes before or after "event". This should be used for units that release a projectile, and then load a new one during their animation cycle.
= How to tweak animation speeds =
Some general guidelines:
The [wiki:Atlas_User%27s_Guide#TheActorViewer Actor Viewer] is the easiest way to test animations. Tell it to display an entity which uses the actor you're testing, and it will pick up the entity's movement speed and attack speed. Use the 'Slow' mode to get the synchronisation more precise. If you edit and save an actor XML file while viewing the unit, it will be automatically reloaded and displayed.
* '''idle''', '''death''', '''gather_(fruit|grain|meat)''': Adjust the ''speed'' attribute to control the speed. (Death animations are looped in the Actor Viewer, but will only be played once in the game. The last frame will be used for corpses.)
* '''walk''', '''run''': Adjust the ''speed'' attribute. This should probably be chosen so there's not much foot sliding. The speed will also be affected by the `<UnitMotion>` in the entity template XML file - changing the unit's movement speed will change the animation speed (so the stride length will stay the same).
* '''gather_(metal|stone|wood)''', '''build''': Adjust ''speed''. Set the ''event'' attribute to a fraction in the range 0.0 .. 1.0, to indicate where the tool hits the target - the sound will play at this point.
* Melee '''attack''': The speed is determined entirely by the `<Attack>` component's `<RepeatTime>` in the entity XML. Ignore the ''speed'' in the actor. If necessary, adjust the entity speed so the animation looks okay (but this has an effect on gameplay too). Set the ''event'' attribute to a fraction, so it matches where the enemy is contacted - the sound will play at this point and the target will be hurt.
* Ranged '''attack''': Similar to melee. Put a prop on ''loaded-r_hand'' (or any ''loaded-'') for the held projectile. Put a prop on ''projectile'' to define what the launched projectile will look like. Set ''event'' to a fraction that matches where the projectile is released (the ''loaded-'' prop will be hidden). Set the ''load'' attribute to a fraction where the ''loaded-'' prop will be made visible again.
* Cavalry, chariots: Put the ''event'' and projectile things on the rider actor, not on the base horse actor. The horse shouldn't use any ''event'' at all (else it will get synchronised when it shouldn't).