From 52266f353f450fb6aa8ca4297b02baa6abf54af3 Mon Sep 17 00:00:00 2001 From: NaruTrey Date: Tue, 21 Jun 2016 16:31:30 +0400 Subject: [PATCH] lua_api.txt: Added description of a method set_animation --- doc/lua_api.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/lua_api.txt b/doc/lua_api.txt index d42bfdb19..46c066c72 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -2628,8 +2628,16 @@ This is basically a reference to a C++ `ServerActiveObject` * `set_wielded_item(item)`: replaces the wielded item, returns `true` if successful * `set_armor_groups({group1=rating, group2=rating, ...})` * `get_armor_groups()`: returns a table with the armor group ratings -* `set_animation({x=1,y=1}, frame_speed=15, frame_blend=0, frame_loop=true, restart=false)` -* `get_animation()`: returns range, frame_speed, frame_blend and frame_loop +* `set_animation(frame_range={x=1,y=1}, frame_speed=15, frame_blend=0, frame_loop=true, restart=false)` + * Setting animation mesh + * `frame_range`: Range at which animation will go, where x is start frame, y end frame + * `frame_speed`: Speed in frames per second + * `frame_blend`: Time in seconds for a smooth transition from the old range of animation to the new range + * `frame_loop`: If `true`, animation will looped + * `restart`: If `true`, current animation frame is reset to the start frame, + otherwise current frame will be moved to the difference between the old and the new start frame, + for example, if start frame was 10, become 30, the current frame 19 becomes 39 +* `get_animation()`: returns frame_range, frame_speed, frame_blend and frame_loop * `set_attach(parent, bone, position, rotation)` * `bone`: string * `position`: `{x=num, y=num, z=num}` (relative)