![]() |
Making a blowtorch. Drawing the flame?
I'm trying to make a blowtorch similar to the Condition-Zero one. Basically it draws a few sprites coming off of what I think might be an attachment point on the model. I dunno how to make it draw the sprites though.
gEngfuncs.pEfxAPI->R_TempSprite( vecSrc, origin, 0.1, m_iBalls, kRenderGlow, kRenderFxNoDissipation, 255.0, 1.0, FTENT_FADEOUT ); I use that to create one of the sprites, but it creates it right at my origin and I don't know how to create it at the attachment point. Any idea how to make this work? |
Re: Making a blowtorch. Drawing the flame?
Try looking up particle effects?
|
Re: Making a blowtorch. Drawing the flame?
What if you use pfnGetBonePosition() to get the exact location of the attachment point and then display the sprite there ?
Also you might want to look at temporary entities. Some of them are TE_PLAYERATTACHMENT, which mean they're "stuck" to an entity's origin and track it as long as the entity is not destroyed. That's what I use to display the HLVoice speaker icons over my bots' heads. |
Re: Making a blowtorch. Drawing the flame?
I do not think that GetBonePosition is client side which is what his code looks like. Though, there is lots of missing information here. All you posted was one line and thats really hard to diagnose. Try posting the function you are using so some of the variables that were referenced in that line make more sense.
|
Re: Making a blowtorch. Drawing the flame?
See cl_dll\entity.cpp in the HUD_StudioEvent() function where muzzle flashes are drawn based on the attachment point of a weapon.
botman |
Re: Making a blowtorch. Drawing the flame?
Thanks botman, I'll look into that. What I'm trying to do is a muzzleflash type of thing that constantly glows at the attachmentpoint for this sprite. I will have a few of them all lined up actually. This will give the blowtorch look to it.
|
Re: Making a blowtorch. Drawing the flame?
Problem...
Code:
case 5001: |
All times are GMT +2. The time now is 13:13. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.