News | Forum | People | FAQ | Links | Search | Register | Log in
Third-person Weapons?
I'm working on a multiplayer game on top of DarkPlaces, since it seems to be the engine with the best netcode around, and also provides extensions to QC. I've started with that old ScratchQC project and, so far, i've been having fun.

One of the things that i've been trying to do now, is to have a third-person weapon socket, where i can attach the model of the weapon the current player is using. I'm using IQM as the model format and i already have a bone in the model named "mount0". Is there any documentation on how to achieve this in QuakeC? Do i need any kind of engine modification?
Stuff And Talk 
One possibility is for you to use this weaponless Ranger model coupled with weapons that were pre-animated on top of the player model (although those are enhanced models):
http://gfx.quakeworld.nu/details/312/vwplayermdl-vwep-prerequisity/
http://gfx.quakeworld.nu/details/238/trickles-vwep-package/

Another thing you could try is to animate your models while taking references on top of the player's animations (especially if the player's model has no weapons in hand beforehand). Take note that they have to be separate models. Once you animated the weapons with the same amount of frames as the player's, you could easily do something in QC like show the appropriate weapons depending on the used slot, and rendering them invisible once he dies. 
 
Also... 
Make sure you use capnbubs model 
Also... 
Make sure you use capnbubs model 
 
Yeah that's how the sword is done in my rpg mod. Qc is included iirc. I'd the frames match, it's almost trivial. 
Darkplaces Options 
If you're not worried about limiting yourself to options that only work in darkplaces (and by using IQM you're certainly eliminating most options), then a good place to look for some skeleton "How to" guides is dpextensions.qc

That's a qc file which comes with darkplaces, and give you a list of all the extensions it supports. MOVETYPE_FOLLOW is one option which will work in a similar way to how Quake 2 does weapon models. However, the entity will be visible to the player it's attached to, which isn't ideal.

Another approach is to look at the docs for setattachment and DP_QC_GETTAGINFO. I'm not sure if DP_GFX_QUAKE3MODELTAGS works on IQM, but I've used it with success on MD3 models, so it's a good thing to play around with. setattachment has the advantage that entities attached to the player are not drawn from that player's first person view. 
Post A Reply:
Name:
Title:
Body:
message
question
exclamation
idea
flame
noflame
error
skull
beer
moon
pent
rocket
sheep
pacman
pig
cheese
worldcraft
gauntlet
crate
pitfall
pimp
smile
cool
sad
frown
oi
yay
tongue
evil
wink
neutral
q1
q2
q3
ut
hl
cs
doom
dkt
serious
cube
Website copyright © 2002-2017 John Fitzgibbons. All posts are copyright their respective authors.