Garry's Mod

Garry's Mod

Not enough ratings
Custom Lua Animations Library | Developer Tool
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Roleplay, Scenic
File Size
Posted
1.652 KB
29 Apr, 2019 @ 5:22pm
1 Change Note ( view )

Subscribe to download
Custom Lua Animations Library | Developer Tool

Description


Join our Imperial Roleplay!
steam://connect/imp.wildfire.wtf:27015

Join us on Discord!
https://discord.gg/y3vkTgb

THIS IS A DEVELOPERS ADDON. THERE IS ONLY A SALUTE EXAMPLE INSIDE OF THIS ADDON!
YOU HAVE TO MANUALLY CREATE SERVER SIDED CONFIGURATIONS AND CALL THE ANIMATIONS YOURSELF.

This addon allows you to create single frame animations with lua bone modifications.
These are easily made similar to PAC3 (without an editor.)

An example animation is this Salute Animation.

addLuaAnim("salute", {
{bone = animBones["r_arm_lower"],
ang = Angle(-25,-100,0),
vec = Vector(0,0,0),
rate = 0.45},
{bone = animBones["r_arm_upper"],
ang = Angle(45,-90,0),
vec = Vector(0,0,0),
rate = 0.65},
{bone = animBones["r_hand"],
ang = Angle(15,10,0),
vec = Vector(0,0,0),
rate = 1},
{bone = animBones["l_foot"],
ang = Angle(15,10,0),
vec = Vector(-1,0,1),
rate = 1},
{bone = animBones["r_foot"],
ang = Angle(-10,10,0),
vec = Vector(-1,0,-1),
rate = 1},
{bone = animBones["l_leg_upper"],
ang = Angle(0,5,0),
vec = Vector(0,0,0),
rate = 1},
{bone = animBones["l_leg_lower"],
ang = Angle(0,-15,0),
vec = Vector(0,0,0),
rate = 2},
{bone = animBones["r_leg_lower"],
ang = Angle(0,-15,0),
vec = Vector(0,0,0),
rate = 2},
})
The rate is the speed at which the bone moves, meaning you can have some move
a little faster than others. Be careful with setting this too high or too low
as this may cause the clients to not calculate this correctly.

You can play this animation by simply calling

ply:luaAnim("salute", 2)

inside of your code, this entire addon is SERVER sided meaning
your animation data is protected from scripthooking and decaching.
The animation you make are yours to keep, nobody can steal them from you.

Inside this base, I have included some a table of common bones, in the
example you see I reference the table animBones

You can type "getAnimBones" into console to have a full print out of bones
You can use the data on the left as your bone input.

If your model has custom bones but you don't know their names, you can type
"boneDump" into console to print out YOUR current player models bones.

If you would like to share some of your animations into this base, send me
the configuration and a few details about them and I can include them inside
the base.
6 Comments
Higx 19 May, 2023 @ 2:20pm 
Is it possible to use this addon to create custom holdtype?
Hope 24 Jun, 2020 @ 10:39am 
Hello friend. Do you know how to disable Jump animation or Walking animation while playing our animation? Cause it kinda make the animation looks funny. :steamhappy: hope you reply to this message
Lord Tyler  [author] 30 Apr, 2019 @ 10:30am 
If you make something with this, make sure to add this as a dependency <3
IvanVladimir0435 30 Apr, 2019 @ 9:28am 
Thanks I like this
Killeo 29 Apr, 2019 @ 5:29pm 
Very cool, thank you