Parenting to a specific bone

I need to parent an entity to a player’s head rather than himself as a whole.

Anyone know how to do this?


(User was banned for this post ("Bump" - mahalis))

Search is your friend! :slight_smile:
http://www.facepunch.com/showthread.php?t=697046&highlight=parent+bone

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.

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.



local classtable = {
    "name of class, model, hp, blahhh etc",
    "name of class, model, hp, blahhh etc",
    "name of class, model, hp, blahhh etc"
}


Place a table inside the table. :smile:


local classtable = {}
{ "npc_zombie" , "model",100 , "blahhh etc" },
{ "npc_headcrab" , "model",25, "blahhh etc" },
{ "npc_citizen" , "model",100 , "blahhh etc" }
}

You could also index them by classname if you like :


local classtable = {}
classtable[npc_zombie] = { "model",100 , "blahhh etc" }
classtable[npc_headcrab] = { "model",25, "blahhh etc" }
classtable[npc_citizen] = { "model",100 , "blahhh etc" }


Do an EF_BONEMERGE.