AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Change beam color, hooking beam ents? (https://forums.alliedmods.net/showthread.php?t=64920)

Drak 12-27-2007 14:22

Change beam color, hooking beam ents?
 
I can't figure out a way to hook 'beams'. (Tripmine lasers, the egon's weapon laser). What I'm trying to do, is change the color of the tripmine's beam.
Quote:

Originally Posted by HL SDK
void CTripmineGrenade :: MakeBeam( void )
{
TraceResult tr;

// ALERT( at_console, "serverflags %f\n", gpGlobals->serverflags );

UTIL_TraceLine( pev->origin, m_vecEnd, dont_ignore_monsters, ENT( pev ), &tr );

m_flBeamLength = tr.flFraction;

// set to follow laser spot
SetThink( BeamBreakThink );
pev->nextthink = gpGlobals->time + 0.1;

Vector vecTmpEnd = pev->origin + m_vecDir * 2048 * m_flBeamLength;

m_pBeam = CBeam::BeamCreate( g_pModelNameLaser, 10 );
m_pBeam->PointEntInit( vecTmpEnd, entindex() );
m_pBeam->SetColor( 0, 214, 198 );
m_pBeam->SetScrollRate( 255 );
m_pBeam->SetBrightness( 64 );
}

Is there anyway to change the color, or catch when the beam is created?

Alka 12-27-2007 14:49

Re: Change beam color, hooking beam ents?
 
Hmmm,
Code:

m_pBeam = CBeam::BeamCreate( g_pModelNameLaser, 10 );
search for func "BeamCreate(...)", maybe the color is already defined in func, by default.


All times are GMT -4. The time now is 11:04.

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