Difference between revisions of "Talk:L4D Glow Effect"

From Valve Developer Community
Jump to: navigation, search
m
Line 5: Line 5:
 
First you should implement the screenspace effect as in the tutorial. Then add these lines of code the the Spawn() function of the npc_metrocop if you want the effect to be active during the entire life of the npc:
 
First you should implement the screenspace effect as in the tutorial. Then add these lines of code the the Spawn() function of the npc_metrocop if you want the effect to be active during the entire life of the npc:
  
 +
<source lang=cpp>
 
CEntGlowEffect *pGlowEffect = (CEntGlowEffect*)g_pScreenSpaceEffects->GetScreenSpaceEffect("ge_entglow");
 
CEntGlowEffect *pGlowEffect = (CEntGlowEffect*)g_pScreenSpaceEffects->GetScreenSpaceEffect("ge_entglow");
 
pGlowEffect->RegisterEnt( this, Color(255, 255, 255, 100) );
 
pGlowEffect->RegisterEnt( this, Color(255, 255, 255, 100) );
 +
</source>
  
 
Make sure you #include "ge_screeneffects.h" in the npc_metrocop cpp file so that you can properly find the glow effect. --[[User:Killermonkey|killermonkey]] 03:07, 16 December 2009 (UTC)
 
Make sure you #include "ge_screeneffects.h" in the npc_metrocop cpp file so that you can properly find the glow effect. --[[User:Killermonkey|killermonkey]] 03:07, 16 December 2009 (UTC)
  
 
----
 
----

Revision as of 03:08, 16 December 2009

Hello i need help getting the entities to register themselves with the effect. I'm trying to make a npc_metrocop glow. Help would be much appreciated.


First you should implement the screenspace effect as in the tutorial. Then add these lines of code the the Spawn() function of the npc_metrocop if you want the effect to be active during the entire life of the npc:

CEntGlowEffect *pGlowEffect = (CEntGlowEffect*)g_pScreenSpaceEffects->GetScreenSpaceEffect("ge_entglow");
pGlowEffect->RegisterEnt( this, Color(255, 255, 255, 100) );

Make sure you #include "ge_screeneffects.h" in the npc_metrocop cpp file so that you can properly find the glow effect. --killermonkey 03:07, 16 December 2009 (UTC)