• Parenting to a specific bone
    5 replies, posted
I need to parent an entity to a player's head rather than himself as a whole.
Anyone know how to do this? [highlight](User was banned for this post ("Bump" - mahalis))[/highlight]
Search is your friend! :) [url]http://www.facepunch.com/showthread.php?t=697046&highlight=parent+bone[/url] I used this method successfully but don't have the code here. I'll share it if you still need it when I get home. [url]http://developer.valvesoftware.com/wiki/Entity_Hierarchy_(parenting)#SetParentAttachment[/url]
Ah, thanks. Also, how would I have multiple values for a single, uh, part in the table? Like...having the same "entry" but is has multiple values or whatever. [code] local classtable = { "name of class, model, hp, blahhh etc", "name of class, model, hp, blahhh etc", "name of class, model, hp, blahhh etc" } [/code]
Place a table inside the table. :smile: [code]local classtable = {} { "npc_zombie" , "model",100 , "blahhh etc" }, { "npc_headcrab" , "model",25, "blahhh etc" }, { "npc_citizen" , "model",100 , "blahhh etc" } }[/code] You could also index them by classname if you like : [code]local classtable = {} classtable[npc_zombie] = { "model",100 , "blahhh etc" } classtable[npc_headcrab] = { "model",25, "blahhh etc" } classtable[npc_citizen] = { "model",100 , "blahhh etc" } [/code]
Do an EF_BONEMERGE.
Sorry, you need to Log In to post a reply to this thread.