Visible traceline
Moderator: InsideQC Admins
10 posts
• Page 1 of 1
Visible traceline
How can I create a visible traceline for bullets?
I'm trying to create a simple gun that shoots almost instantly and I need a traceline for the bullet that fades away after a while.
I'm trying to create a simple gun that shoots almost instantly and I need a traceline for the bullet that fades away after a while.
QuakeWiki
getButterfly - WordPress Support Services
Roo Holidays
Fear not the dark, but what the dark hides.
getButterfly - WordPress Support Services
Roo Holidays
Fear not the dark, but what the dark hides.
-

Chip - Posts: 575
- Joined: Wed Jan 21, 2009 9:12 am
- Location: Dublin, Ireland
-

Error - InsideQC Staff
- Posts: 865
- Joined: Fri Nov 05, 2004 5:15 am
- Location: VA, USA
Yeah there's no standard 'beam' builtin for engines like Half-Life has. Darkplaces at least has this weird undocumented "TE_TEI_G3" (NOT in dpextensions.qc) which is a white plane beam powered by two vectors (origin, destination) and a third filler vector of useless (Engoo reads it as rgb to make the color of the beam
)). It was implemented way back in 2002 for Nexuiz, so using it will be compatible. BUT UNLESS YOU HAVE A LASER GUN OR SOME SORT OF AIR RIFLE IT IS GOING TO SUCK FOR BULLETS.
i should not be here
- leileilol
- Posts: 2783
- Joined: Fri Oct 15, 2004 3:23 am
csqc specs specify a particletrail builtin, dp also implements this serverside. messy or not, it can be used instead of TE_TEI_G3, just give it a nice particle effect and job done.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
Thanks for the help, I'll look those functions up and see what I can come up with.
The original idea was to have a thin trail of smoke which after a couple of seconds would disperse into the air, just like cigarette smoke.
EDIT: Yes, I'm using DarkPlaces.
The original idea was to have a thin trail of smoke which after a couple of seconds would disperse into the air, just like cigarette smoke.
EDIT: Yes, I'm using DarkPlaces.
QuakeWiki
getButterfly - WordPress Support Services
Roo Holidays
Fear not the dark, but what the dark hides.
getButterfly - WordPress Support Services
Roo Holidays
Fear not the dark, but what the dark hides.
-

Chip - Posts: 575
- Joined: Wed Jan 21, 2009 9:12 am
- Location: Dublin, Ireland
If the bullet is instant-hit (like a railgun), then TE_TEI_G3 is the way to go.
Save a file as particles/nexbeam.tga lets you retexture the beam. It's additive. It fades out in a second or so, not sure if you can configure it. Here's my nexbeam texture, it doesn't look like much in a paint program but in game it's a really nice subtle smoke trail (was used for a rifle).
http://www.manchild.org/nexbeam.tga
I think there might also be a console command that dumps the autogenerated particlefont/nexbeam to files. (If the files are present, they override the autogenerated ones.)
- Code: Select all
void(vector start, vector end) te_tei_g3 =
{
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
WriteByte (MSG_BROADCAST, 76);
WriteCoord (MSG_BROADCAST, start_x);
WriteCoord (MSG_BROADCAST, start_y);
WriteCoord (MSG_BROADCAST, start_z);
WriteCoord (MSG_BROADCAST, end_x);
WriteCoord (MSG_BROADCAST, end_y);
WriteCoord (MSG_BROADCAST, end_z);
WriteCoord (MSG_BROADCAST, 0);
WriteCoord (MSG_BROADCAST, 0);
WriteCoord (MSG_BROADCAST, 0);
};
Save a file as particles/nexbeam.tga lets you retexture the beam. It's additive. It fades out in a second or so, not sure if you can configure it. Here's my nexbeam texture, it doesn't look like much in a paint program but in game it's a really nice subtle smoke trail (was used for a rifle).
http://www.manchild.org/nexbeam.tga
I think there might also be a console command that dumps the autogenerated particlefont/nexbeam to files. (If the files are present, they override the autogenerated ones.)
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
- Sajt
- Posts: 1215
- Joined: Sat Oct 16, 2004 3:39 am
-

lth - Posts: 144
- Joined: Thu Nov 11, 2004 1:15 pm
10 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest