======Animation====== ---- **Animations** in RPG in a Box are created in the [[Voxel Editor]] using a frame-by-frame method, similar to the way you'd create a stop motion animation out of LEGO bricks or a flip book by drawing a sequence of images on a stack of paper. When an animation is played, only one frame is displayed at a time, giving the illusion of movement. {{:wiki:anim_example.gif?nolink|}} There are several settings that can adjusted for an animation, each of which will affect its behavior when played. These are configured when defining a new animation for a model from the [[Voxel Editor]] animation toolbar or from the [[Model Properties]] panel for an existing animation. Each setting is described briefly in the table below. {{:wiki:model_props_anims.png?nolink|}} ^Icon^Setting^Description^ |{{:wiki:anim_frame.png?nolink|}}|Name|Name of the animation. This name is case-sensitive and can be referenced by [[scripting_reference|scripting functions]] (for example, the [[Play Animation]] function), and is also used to configure a [[predefined_animation_names|predefined animation]] like "walk" or "idle".| |{{:wiki:clock_play.png?nolink|}}|Start Frame|Frame at which the animation will begin. If the animation has a type of "Loop", this is the frame that will be returned to after the last frame is played.| |{{:wiki:clock_stop.png?nolink|}}|End Frame|Frame at which the the animation will either stop (for example, with a type of "Once") or where a new loop will start (for example, with a type of "Loop").| |{{:wiki:arrow_switch.png?nolink|}}|Randomize Start|When enabled, the animation will begin on a random frame between the start frame and the end frame. This is useful for when you want multiple instances of the same [[object]] or [[tile]] to start their default animations at different times, for example to make a set of animated torches or water [[tile|tiles]] appear more natural and random.| |{{:wiki:play.png?nolink|}}|Type|Determines the looping behavior of the animation, for example if its played only once or loops forever. See [[Animation Types]] for an explanation of each supported type.| |{{:wiki:arrow_speed.png?nolink|}}|Speed|Speed at which the animation will play. This value is measured in frames per second.| |{{:wiki:sound.png?nolink|}}|Sound Effect|[[sound|Sound effect]] that will be played when the animation is first triggered, for example a door opening [[sound|sound effect]] for a door's "open" animation.| |{{:wiki:hourglass.png?nolink|}}|Duration|Informational field to display the animation's length in seconds (or one cycle, in the case of repeating types "Loop" and "Ping Pong"). The clipboard button ({{:wiki:clipboard.png?nolink|}}) can be pressed to copy the length value, for example to paste into a [[Wait]] scripting function.| ~~NOTOC~~