weapon attachments
Moderator: InsideQC Admins
4 posts
• Page 1 of 1
weapon attachments
I finally figured out how to get DPM models working in darkplaces but setattachments isn't working right.
Here's the code:
(yes, I stole it from q1md3)
Now instead of attaching the shotgun to bone20 which is the right hand bone, it just hangs out in between the character's legs.
Here's the code:
- Code: Select all
void(entity person) checkvisibleweapon =
{
setmodel(person.md3weapon, "models/weapons/shotgun.md3");
};
void(entity person) setweaponmodel =
{
//don't add new weapon while respawning in multiplayer
if (person.md3weaponspawned == FALSE)
{
person.md3weapon = spawn();
person.md3weaponspawned = TRUE;
}
setattachment(person.md3weapon, person, "bone20");
person.md3weapon.exteriormodeltoclient = person;
checkvisibleweapon(person);
};
(yes, I stole it from q1md3)
Now instead of attaching the shotgun to bone20 which is the right hand bone, it just hangs out in between the character's legs.
- Boss429
- Posts: 39
- Joined: Sun Dec 03, 2006 7:29 pm
if its between the legs, chances are its using bone #0 instead of bone "bone20". Check that your bone name is correct, and the correct case, and has no whitespace. Etc.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest