Difference between revisions of "Talk:L4D Glow Effect"

From Valve Developer Community
Jump to: navigation, search
m
Line 13: Line 13:
  
 
----
 
----
 +
 +
Thanks for responding. First, I wan't the effect to be toggled on and off. So how would i implement this with the npc? I could place it in hl2_player.cpp, but then how would i register it with the npc? --[[User:Error3972|Error3972]] 20:21, 17 December 2009 (UTC)

Revision as of 20:21, 17 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)


Thanks for responding. First, I wan't the effect to be toggled on and off. So how would i implement this with the npc? I could place it in hl2_player.cpp, but then how would i register it with the npc? --Error3972 20:21, 17 December 2009 (UTC)