• TF2 SNPC animations help.
    4 replies, posted
[lua]ENT.TheAniModel = "models/bots/headless_hatman_animations.mdl" function ENT:Ani() if ENT.TheAniModel then ENT.Run = "Run_ITEM1" ENT.Idle = "Stand_ITEM1" ENT.Attack = "attackStand_ITEM1" end end[/lua] I made a script for my SNPC, The Headless Horsemann, will this work without any errors? NOTE: I moved this because I mistakenly posted in the LUA Scripting forum istead of the Questions subforum.
[QUOTE=Bitl;29027294][lua]ENT.TheAniModel = "models/bots/headless_hatman_animations.mdl" function ENT:Ani() if ENT.TheAniModel then ENT.Run = "Run_ITEM1" ENT.Idle = "Stand_ITEM1" ENT.Attack = "attackStand_ITEM1" end end[/lua] I made a script for my SNPC, The Headless Horsemann, will this work without any errors? NOTE: I moved this because I mistakenly posted in the LUA Scripting forum istead of the Questions subforum.[/QUOTE] 1. Short answer: No. All you've done here is define a variable and provide a function that is never called. There's no way we can know if your script will work when we can't see the rest of the script. 2. Whose script is it that you're using? Point us in their direction or contact them directly. Make sure to obtain their permission if you plan to release this. 3. If you plan on scripting this yourself, you're a long way off. That isn't as harsh as it sounds, AI is perhaps one of the most complex tasks to manage in GMod lua. The documentation out there isn't terrific, either.
[QUOTE=Blargh123;29028173]1. Short answer: No. All you've done here is define a variable and provide a function that is never called. There's no way we can know if your script will work when we can't see the rest of the script. 2. Whose script is it that you're using? Point us in their direction or contact them directly. Make sure to obtain their permission if you plan to release this. 3. If you plan on scripting this yourself, you're a long way off. That isn't as harsh as it sounds, AI is perhaps one of the most complex tasks to manage in GMod lua. The documentation out there isn't terrific, either.[/QUOTE] I made the script myself.
[QUOTE=Bitl;29033527]I made the script myself.[/QUOTE] Then show us the full code. We have no way of knowing if it even gets called, in the code you posted you just assigned some variables, that won't do much.
[QUOTE=freemmaann;29033580]Then show us the full code. We have no way of knowing if it even gets called, in the code you posted you just assigned some variables, that won't do much.[/QUOTE] It IS the full code.
Sorry, you need to Log In to post a reply to this thread.