.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > SDK Programming discussions > Half-Life 1 SDK
Half-Life 1 SDK For developments focused around Half-Life (and its mods) Half-Life

Reply
 
Thread Tools
Making a blowtorch. Drawing the flame?
Old
  (#1)
Lazer
Guest
 
Status:
Posts: n/a
Default Making a blowtorch. Drawing the flame? - 21-02-2004

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?
  
Reply With Quote
Re: Making a blowtorch. Drawing the flame?
Old
  (#2)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 403
Join Date: Nov 2003
Default Re: Making a blowtorch. Drawing the flame? - 22-02-2004

Try looking up particle effects?
  
Reply With Quote
Re: Making a blowtorch. Drawing the flame?
Old
  (#3)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 4643'60N 043'0W 0.187A
Default Re: Making a blowtorch. Drawing the flame? - 22-02-2004

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.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: Making a blowtorch. Drawing the flame?
Old
  (#4)
Lazy
Member
 
Lazy's Avatar
 
Status: Offline
Posts: 236
Join Date: Jan 2004
Location: Toronto, Ontario, Canada
Default Re: Making a blowtorch. Drawing the flame? - 22-02-2004

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.
  
Reply With Quote
Re: Making a blowtorch. Drawing the flame?
Old
  (#5)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: Making a blowtorch. Drawing the flame? - 22-02-2004

See cl_dll\entity.cpp in the HUD_StudioEvent() function where muzzle flashes are drawn based on the attachment point of a weapon.

botman
  
Reply With Quote
Re: Making a blowtorch. Drawing the flame?
Old
  (#6)
Lazer
Guest
 
Status:
Posts: n/a
Default Re: Making a blowtorch. Drawing the flame? - 22-02-2004

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.
  
Reply With Quote
Re: Making a blowtorch. Drawing the flame?
Old
  (#7)
Lazer
Guest
 
Status:
Posts: n/a
Default Re: Making a blowtorch. Drawing the flame? - 22-02-2004

Problem...

Code:
 case 5001: 
	int m_iBalls;
	m_iBalls = gEngfuncs.pEventAPI->EV_FindModelIndex( "sprites/rhotglow.spr" );
	gEngfuncs.pEfxAPI->R_TempSprite( (float *)&entity->attachment[0], (float *)&entity->attachment[1], 0.1, m_iBalls, kRenderGlow, kRenderFxNoDissipation, 255.0, 1.0, FTENT_FADEOUT );
break;
I want to make the sprite move from my attachment[0] to attachment[1]. I guess I'm not doing this right because whenever I shoot now it makes the sprite somewhere flying up into the sky. I can't even figure out a deffinate patter as to where the ball spawns and where it flies to. Any idea what I should use for the first two parameters to make it go from one point to the other?

Last edited by Lazer; 22-02-2004 at 20:09.. Reason: fixing code
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com