• NPC Animations Version 3
    53 replies, posted
[QUOTE=Big Bang;21933420]Well, my system uses sequences on the enumeration list, using the ACT_ enumerations. If your new engine animations do not use these sequences, you're pretty much unable to use them. I don't know if it's possible to set the custom animations to "garbage" ones, like the DoD ones that aren't really used at all.[/QUOTE] Can we not just replace the ACT_ enum part with [b][url=http://wiki.garrysmod.com/?title=Entity.LookupSequence]Entity.LookupSequence [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] and then pass the garbage name through as the parameter?
[QUOTE=Namaste;21933576]Can we not just replace the ACT_ enum part with [b][url=http://wiki.garrysmod.com/?title=Entity.LookupSequence]Entity.LookupSequence [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] and then pass the garbage name through as the parameter?[/QUOTE] Well, LookupSequence was prone to not find the right sequence most of the time. I could try it out, see if it's been fixed. Personally, I prefer activity enumerations, they're easier to work with. Still, all that would be required would simply be a small edit to the HandleSequence function. You can try out if you want.
If I remember correctly, I slightly modified my version of animations.lua in CakeScript to work with my holstering. You may not be able to plug n' play it, did you test it?
I use my own NPC animation script. I was just saying this because I use ACT_ enumerations for whichever ones are provided and then translate the rest with LookupSequence. It's what works for me, but I totally agree with you that activity enumerations are the way to go when possible. I do like how you organize your tables though.
This is broken.
[QUOTE=Horror;22029254]This is broken.[/QUOTE] This is not, guaranteed. I can find you a video and all.
Just a quick question; Does this script work with the Sandbox gamemode, or just Cakescript and Tacoscript? I wanted to use this addon for the purpose of making Garry's mod films, and I have extracted the animations.lua file in to lua/autorun. I also edited the shared.lua and the cl_init.lua in the Sandboxes' gamemode files with the 2 lines of code provided. But still, when I load up Sandbox, I get an error in the console, which reads: animations.lua:625: attempt to index global 'GM' (a nil value) I used lua_openscript and lua_openscript_cl to try and run the scripts again. Still no luck. After I set my model to that of a npc, (To my suprise,) the animations didn't play and it was caught in a "T-pose" Any suggestions or help?
Can you post the video please?
Fixed it, But now weapons don't work in TacoScript2 ( VeniScript2)
[QUOTE=TheSmartass;22064904]Just a quick question; Does this script work with the Sandbox gamemode, or just Cakescript and Tacoscript? I wanted to use this addon for the purpose of making Garry's mod films, and I have extracted the animations.lua file in to lua/autorun. I also edited the shared.lua and the cl_init.lua in the Sandboxes' gamemode files with the 2 lines of code provided. But still, when I load up Sandbox, I get an error in the console, which reads: animations.lua:625: attempt to index global 'GM' (a nil value) I used lua_openscript and lua_openscript_cl to try and run the scripts again. Still no luck. After I set my model to that of a npc, (To my suprise,) the animations didn't play and it was caught in a "T-pose" Any suggestions or help?[/QUOTE] The problem is because I am overriding gamemode hooks ( Only way I can do this, no matter how inefficient it is ). Therefore, you need to install it into a gamemode. A possible solution is extracting the Lua file to the sandbox/gamemode folder instead. [QUOTE=Horror;22100058]Fixed it, But now weapons don't work in TacoScript2 ( VeniScript2)[/QUOTE] Check the holster function. Again, I cannot guarantee that the script will work with all gamemodes universally. That is up to the end user, who is free to modify the file in any way he or she sees fit. I can't compromise usability and efficiency with compatibility. It's Rick Dark's fault anyway, why did he have to change the animation file around? [B]EDIT:[/B] Any edits to PlayerSetModel may cause this to silently fail. Reasons are unknown. If when you do anims_showstate 1 on your console, and nothing shows up, it's possible that the script may be failing due to this.
Im sorry can some one tell me what to put after ACT_ i want to add some real animations to metro police no offense but they look a bit crapy i mean the metro police holding a baton like a smg when walking and all that. ive looked in the source model viewer and at the animations in it but i cant get a hang of it.
[QUOTE=snake doc;22196016]Im sorry can some one tell me what to put after ACT_ i want to add some real animations to metro police no offense but they look a bit crapy i mean the metro police holding a baton like a smg when walking and all that. ive looked in the source model viewer and at the animations in it but i cant get a hang of it.[/QUOTE] The problem is that regular HL2 weapons don't have a holdtype defined, so they return as "default", and thus doing the crappy animations. Just replace the HL2 weapons with SWEPS, I have no idea as to why would anyone keep using HL2 weapons given that there are so many excellent Lua based replacements for them, but whatever.
Okay thanks ill use twitch instead then i just had some problems finding melee weapon replacements.
One of the problems I have had while trying to implement this is that, when i switch to a hands swep with the default holdtype, it seems to wait before the hands are put down to the side. So it looks like you have a rifle that is invisible. Another problem is that alot of the basic weapons (ie Physgun, Gravgun, Toolgun) all look like their being aimed as rifles too. I am not sure if this is a bug with just mine or not, but I haven't edited this file to the point that it would do that, because it did that right out of the box.
How did you get it working? I've tried putting it in lua/autorun/ (Didn't work, gave me a GM is a nill value or something) Tried putting it in a gamemode, and still didn't work.
when you add it to your gamemode, make sure you go into init.lua and do all the steps he said for installing it into a gamemode.
[QUOTE=Epinephrine;22279986]One of the problems I have had while trying to implement this is that, when i switch to a hands swep with the default holdtype, it seems to wait before the hands are put down to the side. So it looks like you have a rifle that is invisible. Another problem is that alot of the basic weapons (ie Physgun, Gravgun, Toolgun) all look like their being aimed as rifles too. I am not sure if this is a bug with just mine or not, but I haven't edited this file to the point that it would do that, because it did that right out of the box.[/QUOTE] Well, I'll be honest with you all. I was lazy, and for various reasons I limited the holdtypes to just four, default, grenade, pistol, rifle. Since NPCs usually have only those animations, I thought there would be no problem. However, I made another version, for my personal use ( could be essentially version 4 ), on my script, that has full holdtype animations. However, it introduces several architectural changes. Primarily, I don't use player models, but instead a centric "skeleton" model, where I stick stuff upon, allowing me to have for example, a different head on a different body ( citizens on combine armor ), or citizens using Combine animations, allowing me to fill in for the animations that citizens don't have but other NPCs do, like pistol animations. Even further, using that has got me into a bunch of trouble with Andrew McWatters, the creator of the Player Clothing addon, even though I only use the general idea of using entities to handle clothing ( Differently though, I only use one entity, he uses 3 ), and though I asked permission to him on March through e-mail ( he replied ). Only one line is similar because there's no other way of making an entity animate using it's parent. The line is the following, obfuscated for your viewing pleasure ( Because apparently this line is a trade secret or something ) [lua]self.Entity:AddEffects( math.ceil( math.log( 2.71828 ) ) | math.floor( math.log10( math.pow( 2, 7 ) ) ) * ( math.pow( 2, 5 ) * 2 ) | math.floor( math.log10( math.pow( 2, 7 ) ) ) * ( math.pow( 2, 5 ) * math.pow( 13 + 3, 0.5 ) ) )[/lua] So, yeah. I can't release the fixed version for various reasons. If someone would be kind enough to provide fixes from now on, I'd greatly appreciate it.
Lua is open source and no-one can't just stop you from taking ideas and implementing them in your own way. You don't even have to ask a permission for ideas. How could EF_BONEMERGE and EF_PARENTANIMATES be a trade secret anyway?
Release what you want.
[QUOTE=DarKSunrise;22321116]Lua is open source and no-one can't just stop you from taking ideas and implementing them in your own way. You don't even have to ask a permission for ideas.[/QUOTE] True, I'm not afraid of legal action, though. It's kind of a moralistic thing. That and the fact it's more complex to install than the current script, and if people already have trouble installing the current one, well, it's easy to assume they won't manage to work out the other one. [QUOTE=DarKSunrise;22321116]How could EF_BONEMERGE and EF_PARENTANIMATES be a trade secret anyway?[/QUOTE] :ssh: . It took me a little while to figure out how to obfuscate 1, 128 and 512 anyway. [QUOTE=_Chewgum;22322458]Release what you want.[/QUOTE] Which is kind of the issue. I don't want to release yet.
Slight bump, I made a version for Tacoscript 1 since it's structure is so odd. [url]http://www.garrysmod.org/downloads/?a=view&id=100345[/url]
Toggleholster with that update doesn't work, I've had various people on my servers try it, it won't work.
[QUOTE=BurningPride;21843979]Can we have a little video?[/QUOTE] Yea id really like if we cud in fact see this in action.
This thread is six months old, if there was a video he would have posted it, don't you think?
Sorry, you need to Log In to post a reply to this thread.