Raised This Month: $ Target: $400
 0% 

Q2 railgun effect w/ TEs?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Drak
Veteran Member
Join Date: Jul 2005
Old 06-21-2007 , 14:36   Re: Q2 railgun effect w/ TEs?
Reply With Quote #1

Yeah, the gluon gun uses a sprite based effect. Which incase you don't have the HL SDK, here's the snippet when the effect is called:
Code:
void CEgon::CreateEffect( void ) { #ifndef CLIENT_DLL     DestroyEffect();     m_pBeam = CBeam::BeamCreate( EGON_BEAM_SPRITE, 40 );     m_pBeam->PointEntInit( pev->origin, m_pPlayer->entindex() );     m_pBeam->SetFlags( BEAM_FSINE );     m_pBeam->SetEndAttachment( 1 );     m_pBeam->pev->spawnflags |= SF_BEAM_TEMPORARY;  // Flag these to be destroyed on save/restore or level transition     m_pBeam->pev->flags |= FL_SKIPLOCALHOST;     m_pBeam->pev->owner = m_pPlayer->edict();     m_pNoise = CBeam::BeamCreate( EGON_BEAM_SPRITE, 55 );     m_pNoise->PointEntInit( pev->origin, m_pPlayer->entindex() );     m_pNoise->SetScrollRate( 25 );     m_pNoise->SetBrightness( 100 );     m_pNoise->SetEndAttachment( 1 );     m_pNoise->pev->spawnflags |= SF_BEAM_TEMPORARY;     m_pNoise->pev->flags |= FL_SKIPLOCALHOST;     m_pNoise->pev->owner = m_pPlayer->edict();     m_pSprite = CSprite::SpriteCreate( EGON_FLARE_SPRITE, pev->origin, FALSE );     m_pSprite->pev->scale = 1.0;     m_pSprite->SetTransparency( kRenderGlow, 255, 255, 255, 255, kRenderFxNoDissipation );     m_pSprite->pev->spawnflags |= SF_SPRITE_TEMPORARY;     m_pSprite->pev->flags |= FL_SKIPLOCALHOST;     m_pSprite->pev->owner = m_pPlayer->edict();     if ( m_fireMode == FIRE_WIDE )     {         m_pBeam->SetScrollRate( 50 );         m_pBeam->SetNoise( 20 );         m_pNoise->SetColor( 50, 50, 255 );         m_pNoise->SetNoise( 8 );     }     else     {         m_pBeam->SetScrollRate( 110 );         m_pBeam->SetNoise( 5 );         m_pNoise->SetColor( 80, 120, 255 );         m_pNoise->SetNoise( 2 );     } #endif } CSprite *CSprite::SpriteCreate( const char *pSpriteName, const Vector &origin, BOOL animate ) {     CSprite *pSprite = GetClassPtr( (CSprite *)NULL );     pSprite->SpriteInit( pSpriteName, origin );     pSprite->pev->classname = MAKE_STRING("env_sprite");     pSprite->pev->solid = SOLID_NOT;     pSprite->pev->movetype = MOVETYPE_NOCLIP;     if ( animate )         pSprite->TurnOn();     return pSprite; } CBeam *CBeam::BeamCreate( const char *pSpriteName, int width ) {     // Create a new entity with CBeam private data     CBeam *pBeam = GetClassPtr( (CBeam *)NULL );     pBeam->pev->classname = MAKE_STRING("beam");     pBeam->BeamInit( pSpriteName, width );     return pBeam; }

Not sure if that will help you at all.
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 06-21-2007 , 17:08   Re: Q2 railgun effect w/ TEs?
Reply With Quote #2

Thanks for that info SixTwin, but I can't seem to figure out what would cause the spiral effect of it. I thought maybe it was the "SetScrollRate" but isn't that how fast the frames go on the sprite?
hlstriker is offline
Reply



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


All times are GMT -4. The time now is 21:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode