• Dancing NPC's
    1 replies, posted
Hey fellow Facepunchers! My name is LOT and I'm trying to accomplish something :) Basically what I'm trying to do is figure out (if possible) how to create an NPC that's always dancing in a loop. Over and over.. Forever :D Because halloween is coming up and I want dancing skeletons to greet my players. Lel Kinda like this >> [IMG]http://oi57.tinypic.com/vdkg48.jpg[/IMG] ^ Image above does not fully represent the animation I'm trying to get the NPC's to do. :P
You mean dancing skeletons who are just dancing in front of the players? 1. Have a NPC with dancing animation. 2. Use nextbot. 3. Assuming your skeletons will be in the lobby of the players, search for a perfect place for put the dancing skeletons, ideally, in the back middle of the lobby. 4. If found, use in the console: lua_run Entity(1):GetEyeTrace().HitPos and note it somewhere 5. In the nextbot code, in ENT:Initialize(), put a self:SetPos(Vector(The vector you noted on 4.)) 6. In the nextbot code, make the NPC dance using self:PlaySequenceAndWait("animation",1) It's easy, you have just to put that in the ENT:RunBehaviour(), it should looks like this: [CODE] function ENT:RunBehaviour() while true do self:PlaySequenceAndWait("dancing_animation",1) coroutine.wait(0.01) end end [/CODE] 7. You are done. Look on this page for more infos on NextBot: [url]http://wiki.garrysmod.com/page/NextBot_NPC_Creation[/url]
Sorry, you need to Log In to post a reply to this thread.