Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

weapon attachments

| Inside3d Forums Forum Index -> QuakeC Programming

View previous topic :: View next topic
Author | Message
--- | ---
Boss429 Joined: 03 Dec 2006 Posts: 22 |

Posted: Wed Oct 14, 2009 4:49 am Post subject: weapon attachments |

I finally figured out how to get DPM models working in darkplaces but setattachments isn't working right. Here's the code:

Code:
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.

Back to top |

Spike Joined: 05 Nov 2004 Posts: 944 Location: UK |

Posted: Wed Oct 14, 2009 9:22 am Post subject: |

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. _________________ What's a signature?

Back to top |

Boss429 Joined: 03 Dec 2006 Posts: 22 |

Posted: Wed Oct 14, 2009 6:12 pm Post subject: |

yeah i've tried using different bones and it always appears at bone0

Back to top |

Spike Joined: 05 Nov 2004 Posts: 944 Location: UK |

Posted: Wed Oct 14, 2009 7:30 pm Post subject: |

try setting person.md3weapon.tag_index directly instead. _________________ What's a signature?

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> QuakeC Programming | All times are GMT
Page 1 of 1

Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group