• Lua Animations API beta
    427 replies, posted
  • Avatar of Kaizergidorah
  • [QUOTE=JetBoom;17546036]This is a script that allows you to create dynamic animations using Lua and the BuildBonePositions function. Two example stances are included. You should be able to just put this in the autorun folder. Use Entity(1):SetLuaAnimation("staffholdspell") or Entity(1):SetLuaAnimation("stancetest") and then turn third person mode on to see the examples. staffholdspell will only work correctly if you have a weapon out that uses the ACT_HL2MP_IDLE_MELEE[b]2[/b] group. V2 allows you to also specify a 'time to arrive' as the second argument of starting or starting an animation. Sort of a blend. 0.2 is an ideal number. [highlight]Download API + editor:[/highlight] [url]http://heavy.noxiousnet.com/boneanimlib_v3.zip[/url] [b]Old image but you get the point.[/b] [img]http://heavy.noxiousnet.com/img/noxious_team_play/customluaanimations.jpg[/img] [img]http://heavy.noxiousnet.com/img/noxious_team_play/noxtp_fortis0003.jpg[/img] [img]http://heavy.noxiousnet.com/img/noxious_team_play/noxtp_fortis0002.jpg[/img][/QUOTE] Um crap I forget...wheres the Autorun folder?!
  • Avatar of nivek
  • [QUOTE=Kaizergidorah;25189241]Um crap I forget...wheres the Autorun folder?![/QUOTE] inside the lua folder...
  • Avatar of Bizz
  • You might want to update this, a recent Garrysmod update broke a lot of VGUI. I would appreciate an update greatly.
  • Avatar of TheJjokerR
  • [QUOTE=bizzclaw;25650562]You might want to update this, a recent Garrysmod update broke a lot of VGUI. I would appreciate an update greatly.[/QUOTE] The vgui works fine for me. It's trying to get my character to do something which is breaking my balls.
  • Avatar of HyyperVyyper
  • I'm getting this error like a few above. [code]] animate [lua\autorun\cl_animeditor.lua:463] attempt to index global 'vgui' (a nil value)[/code] I tried deleting a few addons that might conflict with it (Evolve and Ulx were in my addons, I deleted those along with anything lua based). I remember reading that it had to be in autorun and autorun/server... and somebody else said it might need to be in autorun/client or something. So maybe placement has something to do with this? [b]EDIT:[/b] And I would be right. You can't just copy and paste the code into garrysmod/lua/autorun for it to work. Instead, place the cl_animeditor.lua file into autorun/client and the other 3 lua files must go into lua/boneanimlib_v2 (you'll have to make this folder, I'm pretty sure it must be named exactly as such). [img]http://i819.photobucket.com/albums/zz115/HyyperVyyper/GMod/luaanimatorfix1.png?t=1289002562[/img] [img]http://i819.photobucket.com/albums/zz115/HyyperVyyper/GMod/luaanimatorfix2.png?t=1289002598[/img] [img]http://i819.photobucket.com/albums/zz115/HyyperVyyper/GMod/luaanimatorfix3.png?t=1289002620[/img] Make sure you restart GMod. Just putting the files in while Gmod is running and starting up a single player game won't work. I get a few errors every here and there but it's working! [img]http://i819.photobucket.com/albums/zz115/HyyperVyyper/GMod/luaanimatorfix4.png?t=1289002663[/img]
  • Avatar of Speedspaz
  • It works for me but İt says that [B]autorun/boneanimlib_v2/cl_boneanimlib.lua has overflowed[/B] please help?!?!?!?
  • Avatar of Mr .Desky
  • Is it possbile to have pac2 props and this active at the same time i could come up with some wonderful stuff if you can find away to use both it and pac2 :) think of the possiblitys you add props and then make custom animations for the props E.g. a pac2 tf2 wepon or something it would be great for machima
  • Someone should make a custom actions addon. Like leaning, proning, rolling and shit.
  • Avatar of Speedspaz
  • [QUOTE=Mr .Desky;25997608]Is it possbile to have pac2 props and this active at the same time i could come up with some wonderful stuff if you can find away to use both it and pac2 :) think of the possiblitys you add props and then make custom animations for the props E.g. a pac2 tf2 wepon or something it would be great for machima[/QUOTE] OK, I'll try thanks :D EDIT: Yay, it works perfectly now but i made an animation and how can i play it?
  • Avatar of Mr .Desky
  • open console lua_run_cl Entity(1):SetLuaAnimation("animationnamehere") (1) can be a ragdoll a player a bot I.e to animate a player E.g. player 3 it would be (3) to get the entity ID of ragdoll you would have to use a wirechip or console command. The wire setup would be either a target finder set to ragdolls or a entity marker linked to ragdoll linked to a entity ID chip found in wire-->entity
  • Avatar of Speedspaz
  • [QUOTE=Mr .Desky;26076310]open console lua_run_cl Entity(1):SetLuaAnimation("animationnamehere") (1) can be a ragdoll a player a bot I.e to animate a player E.g. player 3 it would be (3) to get the entity ID of ragdoll you would have to use a wirechip or console command. The wire setup would be either a target finder set to ragdolls or a entity marker linked to ragdoll linked to a entity ID chip found in wire-->entity[/QUOTE] I didn't understand how to get your number??? EDIT: What is [B]I.e[/B]?
  • Avatar of Python1320
  • [QUOTE=Speedspaz;26094562] EDIT: What is [B]I.e[/B]?[/QUOTE] Let me google that for you. [url]http://en.wikipedia.org/wiki/List_of_Latin_phrases:_I#id_est[/url] Was it so hard? And now to the business. Is anyone using the api on their server or gamemode? I'm wondering how many people actually have used this.
  • Avatar of fnox
  • I've toyed around with this API for a long while during development of Tiramisu. I can tell so far that it works quite well, but it's not recommended to be used on a server without ScriptEnforcer. Nearly any addon can break it unexpectedly, specifically PAC2 and Wire.
  • Avatar of CapsAdmin
  • I've never had a problem with other addons being incompatible with pac's bone override method
  • Avatar of devcon
  • Tried this recently on both PCs that it previously worked on, and it seems broken. No bones move in the editor, and models don't animate with the included stuff either.
  • Avatar of Speedspaz
  • I tried to use lua_run_cl Entity(1):SetLuaAnimation("wave") -i made an animation named wave- but nothing happened? EDIT: Nevermind i figure how to use it :D
  • I can't get this thing to work. All I am trying to do is play an animation when the player user primary attack on a weapon (a jihad bomb). I already made an animation, and copied the lua code to the clipboard. Here it is: [lua] RegisterLuaAnimation('Jihad_Scare', { FrameData = { { BoneInfo = { ['ValveBiped.Bip01_R_Forearm'] = { RU = 31, RR = 12, RF = 24 }, ['ValveBiped.Bip01_Spine4'] = { }, ['ValveBiped.Bip01_R_Hand'] = { }, ['ValveBiped.Bip01_R_Clavicle'] = { RU = -18, RR = -5, RF = 43 }, ['ValveBiped.Bip01_R_UpperArm'] = { RU = -72, RR = 65, RF = -63 } }, FrameRate = 5 }, { BoneInfo = { ['ValveBiped.Bip01_R_Forearm'] = { }, ['ValveBiped.Bip01_Spine4'] = { }, ['ValveBiped.Bip01_R_Hand'] = { }, ['ValveBiped.Bip01_R_Clavicle'] = { }, ['ValveBiped.Bip01_R_UpperArm'] = { } }, FrameRate = 0.35714285714286 } }, Type = TYPE_GESTURE }) [/lua]And put it in sh_boneanimlib.lua. After that, I went to my gamemode folder, and added the API files in there, and included them, like so: IN INIT.LUA [lua] include ("boneanimlib.lua") include ("sh_boneanimlib.lua") AddCSLuaFile("cl_boneanimlib.lua") AddCSLuaFile("sh_boneanimlib.lua") [/lua] IN CL_INIT.LUA [lua] include("cl_boneanimlib.lua") include("sh_boneanimlib.lua") [/lua] Then, I tried putting both self.Owner:ResetLuaAnimation("Jihad_Scare") and self.Owner:SetLuaAnimation("Jihad_Scare") in the SWEP:PrimaryAttack() function. When I test it on a TTT server that I made (Multiplayer, with bots), it gives me [lua][gamemodes\terrortown\entities\weapons\weapon_ttt_jihad\shared.lua:108] attempt to call method 'ResetLuaAnimation' (a nil value) [/lua]everytime.
  • Avatar of Buggzie
  • Are the animations done clientside or serverside? So I can make my own custom animations and go on servers and tease people with em?
  • Avatar of E X C L
  • [QUOTE=Buggzie;28523354]Are the animations done clientside or serverside? So I can make my own custom animations and go on servers and tease people with em?[/QUOTE] Obviously not. Only you will be able to see them.
  • Avatar of MerzBro
  • This API is fucking brilliant! [IMG]http://i1026.photobucket.com/albums/y322/CptNuke/srp_arp_thegarbage_v4_90000-2.jpg[/IMG] I've made holster stances for each weapon. It uses SWEP.HoldType to determine which stance you use. I've also made a SWEP that lets you run player animations on yourself, really handy for roleplay and other shit like that i guess. Here's the holster stances for each weapon type if anyone is interested: [lua] // this goes in a SWEP think hook ( or you could put it in the secondary fire function or whatever) if self.Owner:KeyDown( IN_WALK ) and self.HolsterTime < CurTime() then self.HolsterTime = CurTime() + 2 self.HolsterMode = !self.HolsterMode if self.HolsterMode then self.Owner:SetLuaAnimation( self.HoldType ) else self.Owner:StopAllLuaAnimations( 0.5 ) end end // these go in a shared file... RegisterLuaAnimation('ar2', { FrameData = { { BoneInfo = { ['ValveBiped.Bip01_R_Forearm'] = { }, ['ValveBiped.Bip01_R_UpperArm'] = { }, ['ValveBiped.Bip01_R_Hand'] = { }, ['ValveBiped.Bip01_L_UpperArm'] = { }, ['ValveBiped.Bip01_L_Hand'] = { }, ['ValveBiped.Bip01_L_Forearm'] = { } }, FrameRate = 10 }, { BoneInfo = { ['ValveBiped.Bip01_R_Forearm'] = { RU = 5, RR = -8, RF = 24 }, ['ValveBiped.Bip01_R_UpperArm'] = { RU = 24, RR = -8, RF = -20 }, ['ValveBiped.Bip01_R_Hand'] = { RU = -30, RR = 12, RF = -17 }, ['ValveBiped.Bip01_L_UpperArm'] = { RU = 73, RR = 4 }, ['ValveBiped.Bip01_L_Hand'] = { RU = -4 }, ['ValveBiped.Bip01_L_Forearm'] = { RU = -17 } }, FrameRate = 1.111 }, { BoneInfo = { ['ValveBiped.Bip01_R_Forearm'] = { RU = 5, RR = -8, RF = 24 }, ['ValveBiped.Bip01_R_UpperArm'] = { RU = 24, RR = -8, RF = -20 }, ['ValveBiped.Bip01_R_Hand'] = { RU = -30, RR = 12, RF = -17 }, ['ValveBiped.Bip01_L_UpperArm'] = { RU = 73, RR = 4 }, ['ValveBiped.Bip01_L_Hand'] = { RU = -4 }, ['ValveBiped.Bip01_L_Forearm'] = { RU = -17 } }, FrameRate = 10 } }, RestartFrame = 3, Type = TYPE_STANCE }) RegisterLuaAnimation('shotgun', { FrameData = { { BoneInfo = { ['ValveBiped.Bip01_R_Forearm'] = { }, ['ValveBiped.Bip01_R_UpperArm'] = { }, ['ValveBiped.Bip01_L_UpperArm'] = { }, ['ValveBiped.Bip01_L_Hand'] = { }, ['ValveBiped.Bip01_L_Forearm'] = { } }, FrameRate = 10 }, { BoneInfo = { ['ValveBiped.Bip01_R_Forearm'] = { RU = -4, RR = -62, RF = 6 }, ['ValveBiped.Bip01_R_UpperArm'] = { RU = -28, RR = 43, RF = 9 }, ['ValveBiped.Bip01_L_UpperArm'] = { RU = 70, RR = 12, RF = -10 }, ['ValveBiped.Bip01_L_Hand'] = { RU = -6, RR = -8, RF = -35 }, ['ValveBiped.Bip01_L_Forearm'] = { RU = -8, RR = 13, RF = 2 } }, FrameRate = 1.111 }, { BoneInfo = { ['ValveBiped.Bip01_R_Forearm'] = { RU = -4, RR = -62, RF = 6 }, ['ValveBiped.Bip01_R_UpperArm'] = { RU = -28, RR = 43, RF = 9 }, ['ValveBiped.Bip01_L_UpperArm'] = { RU = 70, RR = 12, RF = -10 }, ['ValveBiped.Bip01_L_Hand'] = { RU = -6, RR = -8, RF = -35 }, ['ValveBiped.Bip01_L_Forearm'] = { RU = -8, RR = 13, RF = 2 } }, FrameRate = 10 } }, RestartFrame = 3, Type = TYPE_STANCE }) RegisterLuaAnimation('smg', { FrameData = { { BoneInfo = { ['ValveBiped.Bip01_R_Forearm'] = { }, ['ValveBiped.Bip01_R_UpperArm'] = { }, ['ValveBiped.Bip01_R_Hand'] = { }, ['ValveBiped.Bip01_L_UpperArm'] = { }, ['ValveBiped.Bip01_L_Hand'] = { }, ['ValveBiped.Bip01_L_Forearm'] = { } }, FrameRate = 10 }, { BoneInfo = { ['ValveBiped.Bip01_R_Forearm'] = { RU = 9, RF = -8 }, ['ValveBiped.Bip01_R_UpperArm'] = { RU = 60, RR = -33, RF = -2 }, ['ValveBiped.Bip01_R_Hand'] = { RU = -15, RR = 3, RF = -33 }, ['ValveBiped.Bip01_L_UpperArm'] = { RU = 27, RR = 32, RF = 24 }, ['ValveBiped.Bip01_L_Hand'] = { RU = -7, RR = -14, RF = 35 }, ['ValveBiped.Bip01_L_Forearm'] = { RU = -24, RR = 34 } }, FrameRate = 1.111 }, { BoneInfo = { ['ValveBiped.Bip01_R_Forearm'] = { RU = 9, RF = -8 }, ['ValveBiped.Bip01_R_UpperArm'] = { RU = 60, RR = -33, RF = -2 }, ['ValveBiped.Bip01_R_Hand'] = { RU = -15, RR = 3, RF = -33 }, ['ValveBiped.Bip01_L_UpperArm'] = { RU = 27, RR = 32, RF = 24 }, ['ValveBiped.Bip01_L_Hand'] = { RU = -7, RR = -14, RF = 35 }, ['ValveBiped.Bip01_L_Forearm'] = { RU = -24, RR = 34 } }, FrameRate = 10 } }, RestartFrame = 3, Type = TYPE_STANCE }) RegisterLuaAnimation('pistol', { FrameData = { { BoneInfo = { ['ValveBiped.Bip01_R_Forearm'] = { }, ['ValveBiped.Bip01_R_UpperArm'] = { }, ['ValveBiped.Bip01_R_Hand'] = { }, ['ValveBiped.Bip01_L_UpperArm'] = { }, ['ValveBiped.Bip01_L_Hand'] = { }, ['ValveBiped.Bip01_L_Forearm'] = { } }, FrameRate = 10 }, { BoneInfo = { ['ValveBiped.Bip01_R_Forearm'] = { RU = -29, RR = 12, RF = 31 }, ['ValveBiped.Bip01_R_UpperArm'] = { RU = 90, RR = -20, RF = -21 }, ['ValveBiped.Bip01_R_Hand'] = { RU = -20, RR = 5, RF = -42 }, ['ValveBiped.Bip01_L_UpperArm'] = { RU = 50, RR = -8, RF = 6 }, ['ValveBiped.Bip01_L_Hand'] = { RU = -38, RR = 4, RF = 122 }, ['ValveBiped.Bip01_L_Forearm'] = { RU = 15, RR = 14, RF = 27 } }, FrameRate = 1.111 }, { BoneInfo = { ['ValveBiped.Bip01_R_Forearm'] = { RU = -29, RR = 12, RF = 31 }, ['ValveBiped.Bip01_R_UpperArm'] = { RU = 90, RR = -20, RF = -21 }, ['ValveBiped.Bip01_R_Hand'] = { RU = -20, RR = 5, RF = -42 }, ['ValveBiped.Bip01_L_UpperArm'] = { RU = 50, RR = -8, RF = 6 }, ['ValveBiped.Bip01_L_Hand'] = { RU = -38, RR = 4, RF = 122 }, ['ValveBiped.Bip01_L_Forearm'] = { RU = 15, RR = 14, RF = 27 } }, FrameRate = 10 } }, RestartFrame = 3, Type = TYPE_STANCE })[/lua] Question: Is there a way to end a stance but slowly lerp back into the original pose? When i end lua animations the player's limbs snap back into place a bit too quickly.
  • Avatar of Buggzie
  • [QUOTE=MerzBro;28604513]This API is fucking brilliant! [img_thumb]http://i1026.photobucket.com/albums/y322/CptNuke/srp_arp_thegarbage_v4_90000-2.jpg[/img_thumb] I've made holster stances for each weapon. It uses SWEP.HoldType to determine which stance you use. I've also made a SWEP that lets you run player animations on yourself, really handy for roleplay and other shit like that i guess. Here's the holster stances for each weapon type if anyone is interested: [lua] // this goes in a SWEP think hook ( or you could put it in the secondary fire function or whatever) if self.Owner:KeyDown( IN_WALK ) and self.HolsterTime < CurTime() then self.HolsterTime = CurTime() + 2 self.HolsterMode = !self.HolsterMode if self.HolsterMode then self.Owner:SetLuaAnimation( self.HoldType ) else self.Owner:StopAllLuaAnimations( 0.5 ) end end // these go in a shared file... RegisterLuaAnimation('ar2', { FrameData = { { BoneInfo = { ['ValveBiped.Bip01_R_Forearm'] = { }, ['ValveBiped.Bip01_R_UpperArm'] = { }, ['ValveBiped.Bip01_R_Hand'] = { }, ['ValveBiped.Bip01_L_UpperArm'] = { }, ['ValveBiped.Bip01_L_Hand'] = { }, ['ValveBiped.Bip01_L_Forearm'] = { } }, FrameRate = 10 }, { BoneInfo = { ['ValveBiped.Bip01_R_Forearm'] = { RU = 5, RR = -8, RF = 24 }, ['ValveBiped.Bip01_R_UpperArm'] = { RU = 24, RR = -8, RF = -20 }, ['ValveBiped.Bip01_R_Hand'] = { RU = -30, RR = 12, RF = -17 }, ['ValveBiped.Bip01_L_UpperArm'] = { RU = 73, RR = 4 }, ['ValveBiped.Bip01_L_Hand'] = { RU = -4 }, ['ValveBiped.Bip01_L_Forearm'] = { RU = -17 } }, FrameRate = 1.111 }, { BoneInfo = { ['ValveBiped.Bip01_R_Forearm'] = { RU = 5, RR = -8, RF = 24 }, ['ValveBiped.Bip01_R_UpperArm'] = { RU = 24, RR = -8, RF = -20 }, ['ValveBiped.Bip01_R_Hand'] = { RU = -30, RR = 12, RF = -17 }, ['ValveBiped.Bip01_L_UpperArm'] = { RU = 73, RR = 4 }, ['ValveBiped.Bip01_L_Hand'] = { RU = -4 }, ['ValveBiped.Bip01_L_Forearm'] = { RU = -17 } }, FrameRate = 10 } }, RestartFrame = 3, Type = TYPE_STANCE }) RegisterLuaAnimation('shotgun', { FrameData = { { BoneInfo = { ['ValveBiped.Bip01_R_Forearm'] = { }, ['ValveBiped.Bip01_R_UpperArm'] = { }, ['ValveBiped.Bip01_L_UpperArm'] = { }, ['ValveBiped.Bip01_L_Hand'] = { }, ['ValveBiped.Bip01_L_Forearm'] = { } }, FrameRate = 10 }, { BoneInfo = { ['ValveBiped.Bip01_R_Forearm'] = { RU = -4, RR = -62, RF = 6 }, ['ValveBiped.Bip01_R_UpperArm'] = { RU = -28, RR = 43, RF = 9 }, ['ValveBiped.Bip01_L_UpperArm'] = { RU = 70, RR = 12, RF = -10 }, ['ValveBiped.Bip01_L_Hand'] = { RU = -6, RR = -8, RF = -35 }, ['ValveBiped.Bip01_L_Forearm'] = { RU = -8, RR = 13, RF = 2 } }, FrameRate = 1.111 }, { BoneInfo = { ['ValveBiped.Bip01_R_Forearm'] = { RU = -4, RR = -62, RF = 6 }, ['ValveBiped.Bip01_R_UpperArm'] = { RU = -28, RR = 43, RF = 9 }, ['ValveBiped.Bip01_L_UpperArm'] = { RU = 70, RR = 12, RF = -10 }, ['ValveBiped.Bip01_L_Hand'] = { RU = -6, RR = -8, RF = -35 }, ['ValveBiped.Bip01_L_Forearm'] = { RU = -8, RR = 13, RF = 2 } }, FrameRate = 10 } }, RestartFrame = 3, Type = TYPE_STANCE }) RegisterLuaAnimation('smg', { FrameData = { { BoneInfo = { ['ValveBiped.Bip01_R_Forearm'] = { }, ['ValveBiped.Bip01_R_UpperArm'] = { }, ['ValveBiped.Bip01_R_Hand'] = { }, ['ValveBiped.Bip01_L_UpperArm'] = { }, ['ValveBiped.Bip01_L_Hand'] = { }, ['ValveBiped.Bip01_L_Forearm'] = { } }, FrameRate = 10 }, { BoneInfo = { ['ValveBiped.Bip01_R_Forearm'] = { RU = 9, RF = -8 }, ['ValveBiped.Bip01_R_UpperArm'] = { RU = 60, RR = -33, RF = -2 }, ['ValveBiped.Bip01_R_Hand'] = { RU = -15, RR = 3, RF = -33 }, ['ValveBiped.Bip01_L_UpperArm'] = { RU = 27, RR = 32, RF = 24 }, ['ValveBiped.Bip01_L_Hand'] = { RU = -7, RR = -14, RF = 35 }, ['ValveBiped.Bip01_L_Forearm'] = { RU = -24, RR = 34 } }, FrameRate = 1.111 }, { BoneInfo = { ['ValveBiped.Bip01_R_Forearm'] = { RU = 9, RF = -8 }, ['ValveBiped.Bip01_R_UpperArm'] = { RU = 60, RR = -33, RF = -2 }, ['ValveBiped.Bip01_R_Hand'] = { RU = -15, RR = 3, RF = -33 }, ['ValveBiped.Bip01_L_UpperArm'] = { RU = 27, RR = 32, RF = 24 }, ['ValveBiped.Bip01_L_Hand'] = { RU = -7, RR = -14, RF = 35 }, ['ValveBiped.Bip01_L_Forearm'] = { RU = -24, RR = 34 } }, FrameRate = 10 } }, RestartFrame = 3, Type = TYPE_STANCE }) RegisterLuaAnimation('pistol', { FrameData = { { BoneInfo = { ['ValveBiped.Bip01_R_Forearm'] = { }, ['ValveBiped.Bip01_R_UpperArm'] = { }, ['ValveBiped.Bip01_R_Hand'] = { }, ['ValveBiped.Bip01_L_UpperArm'] = { }, ['ValveBiped.Bip01_L_Hand'] = { }, ['ValveBiped.Bip01_L_Forearm'] = { } }, FrameRate = 10 }, { BoneInfo = { ['ValveBiped.Bip01_R_Forearm'] = { RU = -29, RR = 12, RF = 31 }, ['ValveBiped.Bip01_R_UpperArm'] = { RU = 90, RR = -20, RF = -21 }, ['ValveBiped.Bip01_R_Hand'] = { RU = -20, RR = 5, RF = -42 }, ['ValveBiped.Bip01_L_UpperArm'] = { RU = 50, RR = -8, RF = 6 }, ['ValveBiped.Bip01_L_Hand'] = { RU = -38, RR = 4, RF = 122 }, ['ValveBiped.Bip01_L_Forearm'] = { RU = 15, RR = 14, RF = 27 } }, FrameRate = 1.111 }, { BoneInfo = { ['ValveBiped.Bip01_R_Forearm'] = { RU = -29, RR = 12, RF = 31 }, ['ValveBiped.Bip01_R_UpperArm'] = { RU = 90, RR = -20, RF = -21 }, ['ValveBiped.Bip01_R_Hand'] = { RU = -20, RR = 5, RF = -42 }, ['ValveBiped.Bip01_L_UpperArm'] = { RU = 50, RR = -8, RF = 6 }, ['ValveBiped.Bip01_L_Hand'] = { RU = -38, RR = 4, RF = 122 }, ['ValveBiped.Bip01_L_Forearm'] = { RU = 15, RR = 14, RF = 27 } }, FrameRate = 10 } }, RestartFrame = 3, Type = TYPE_STANCE })[/lua] Question: Is there a way to end a stance but slowly lerp back into the original pose? When i end lua animations the player's limbs snap back into place a bit too quickly.[/QUOTE] I'm guessing add a timer to slowly move the position instead of snapping it?
  • Avatar of ralle105
  • [QUOTE=MerzBro;28604513] Question: Is there a way to end a stance but slowly lerp back into the original pose? When i end lua animations the player's limbs snap back into place a bit too quickly.[/QUOTE] How about a second animation to lerp the stance back?
  • Avatar of MerzBro
  • I dunno that seems a bit hacky... I thought that the EndLuaanimation function had an argument to specify duration, but it turns out that it's just a delay before snapping it back into place. :saddowns:
  • Avatar of MerzBro
  • Also, this animation API causes playermodels to randomly spaz out. [IMG]http://i1026.photobucket.com/albums/y322/CptNuke/rd_zombocity_f20005-3.jpg[/IMG]
  • Avatar of ralle105
  • I managed to fix such spazzing in another script by calling :SetupBones() before drawing the model.