lua_api.txt: Added description of a method set_animation

This commit is contained in:
NaruTrey 2016-06-21 16:31:30 +04:00
parent af10f26bc3
commit 52266f353f
1 changed files with 10 additions and 2 deletions

View File

@ -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)