I didn't understand how to get your number???
EDIT: What is I.e?
I didn't understand how to get your number???
EDIT: What is I.e?
Let me google that for you.
http://en.wikipedia.org/wiki/List_of...ases:_I#id_est
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.
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.
Lol, We have wiremod AND PAC2. Gotta look into fixing incompatibilities then.
I've never had a problem with other addons being incompatible with pac's bone override method
Oops :s
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.
It works good for me, also, how can I overwrite the bones positions?
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
What gamemode is it on the pictures in the first post ?
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:
And put it in sh_boneanimlib.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 })
After that, I went to my gamemode folder, and added the API files in there, and included them, like so:
IN INIT.LUA
include ("boneanimlib.lua") include ("sh_boneanimlib.lua") AddCSLuaFile("cl_boneanimlib.lua") AddCSLuaFile("sh_boneanimlib.lua")
IN CL_INIT.LUA
include("cl_boneanimlib.lua") include("sh_boneanimlib.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
everytime.[gamemodes\terrortown\entities\weapons\weapon_ttt_jihad\shared.lua:108] attempt to call method 'ResetLuaAnimation' (a nil value)
Are the animations done clientside or serverside?
So I can make my own custom animations and go on servers and tease people with em?
Obviously not. Only you will be able to see them.
This API is fucking brilliant!
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:
// 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 })
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.
I'm guessing add a timer to slowly move the position instead of snapping it?
How about a second animation to lerp the stance back?
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:
Also, this animation API causes playermodels to randomly spaz out.
![]()
I managed to fix such spazzing in another script by calling :SetupBones() before drawing the model.
In which hook are you calling it? I seem to get FPS drops when i call SetupBones() in RenderScreenspaceEffects(), although it could be another thing i added...
If it's for a player I'd call it in PrePlayerDraw.
Are there any released projects , which uses this?
Its strange , I havent seen any
http://code.google.com/p/radioactive-sandbox/
There's an animation SWEP that uses the animation library, as well as holster code for each SWEP that lets you lower your gun.
Really ?
I play radbox quite often and didnt notice it
Is there a way to modify the hitboxes along with this?
] animate
Unknown Command: 'animate'
] animate
Unknown Command: 'animate'
] asfd
Unknown command: asfd
for some reason it prints the first two to the chatbox
I can't get the editor to open
[lua/autorun/client/cl_animeditor.lua:845] attempt to index upvalue 'animationData' (a nil value) ? whenever it uses a TYPE_POSTURE?
I only get this when adding a keyframe beforeadding an animation to the timeline.
Also, the download version in the OP is no good, get the one on garrysmod.org
Is this fixed? I have heard for a while that it was broken.
Can you use this to make custom weapon holdtypes? (I am sick and tired of Dual CSS pistols clipping together because of the default "pistol" holdtype)
The animator doesn't seem to work anymore. I see no errors but this:
Code:] animate Unknown Command: 'animate'
The editor works for me, but when it opens and I try to make a new animation, none of the sliders work and even if I enter numbers manually, when I hit play it doesn't play it.
Slightly modified version: svn://g3.iriz.org/srvaddons/boneanimapi
Username and password: anon
It's the original version but ... "working", at least for what we've used it for.
Can you create client side scripts with gestures? If you can, will they show up on a server that you join?
They. Are. Not. Serverside. Some kid already asked and if they were clientside only you would see them and not everyone on the server for gods sakes.
:ninja:'d
okay i have it here is the FULL GUIDE TO USING THIS!!!!
STEP 1:
Download this...
http://www.garrysmod.org/downloads/?a=view&id=90356
STEP 2: Paste the Contents to garrysmod/lua/
STEP 3: Copy the Contents Inside of boneanimlib_v2 to BOTH!! garrysmod/lua/autorun/client and garrysmod/lua/autorun/server (if you don't have the folders make them)
STEP 4: Go in Game and Type "animate" in Console
STEP 5: Make Your Desired Animation (NOTE: Remember the name you gave it AND NO SPACES IN THE NAME!!!!)
STEP 6: Click "Copy Raw Lua To ClipBoard", open sh_boneanimlib.lua in Boneanimlib_v2 and paste the raw lua at the bottom
STEP 6: VERY IMPORTANT!!! Paste This at the Top of Your SWEP...STEP 7: LAST STEP!!! Now Type in this Snippet in Whatever SWEP Function You Want ( EXAMPLE. function SWEP:Deploy() )include ("boneanimlib.lua") include ("sh_boneanimlib.lua") include ("cl_boneanimlib.lua")STEP 8: Reload GMOD and have Fun!!! NOTE: in step 7 you can also use ResetLuaAnimation or StopLuaAnimation and you can put animations in any swep function except think, if you want a never ending stance then make a stance animation!. Have Fun!!!self.Owner:SetLuaAnimation("WHATEVER YOU NAMED THE ANIMATION ex. KNIFE_STANCE")
-snip-
I read it.
You don't necessarily have to make a swep, you can add console commands for gestures to your server using forcedownload.
-snip-
Edited:
[lua\autorun\client\cl_animeditor.lua:879] attempt to call global 'GetLuaAnimations' (a nil value)
[lua\autorun\client\cl_animeditor.lua:879] attempt to call global 'GetLuaAnimations' (a nil value)
[lua\autorun\client\cl_animeditor.lua:879] attempt to call global 'GetLuaAnimations' (a nil value)
Why? I did it all following that http://www.facepunch.com/threads/821...1#post25874947
Edited:
[lua\autorun\client\cl_animeditor.lua:515] attempt to call method 'StopAllLuaAnimations' (a nil value)
Edited:
Need help.