HL-Style Holographic Effect
Posted: Sat Sep 19, 2026 6:46 pm
If you ever played Half-Life's training you are aware there is a hologram that helps you to pass the tests.
So, I haven't had anything better to do so I decided to "recreate" this effect.
Here's the code. It's quite simple so I think it's understandable.
Will add a short example video to show this simple plugin in action.
EDIT: Click here for the Video.
So, I haven't had anything better to do so I decided to "recreate" this effect.
Here's the code. It's quite simple so I think it's understandable.
Code: Select all
#include <amxmodx>
#include <engine>
const IDDLE7_SEQUENCE = 18;
new g_szModel[ ] = { "models/scientist.mdl" };
public plugin_precache( )
{
precache_model( g_szModel );
}
public plugin_init( )
{
register_clcmd( "say /hologram", "ClCmd_Hologram" );
}
public ClCmd_Hologram( id )
{
new iEnt = create_entity( "info_target" );
if ( is_valid_ent( iEnt ) )
{
entity_set_string( iEnt, EV_SZ_classname, "hlstyle_hologram" );
new Float:fOrigin[ 3 ];
entity_get_vector( id, EV_VEC_origin, fOrigin );
fOrigin[ 0 ] += 50.0;
entity_set_origin( iEnt, fOrigin );
entity_set_model( iEnt, g_szModel );
entity_set_int( iEnt, EV_INT_sequence, IDDLE7_SEQUENCE );
entity_set_int( iEnt, EV_INT_solid, SOLID_NOT );
drop_to_floor( iEnt );
set_rendering( iEnt, kRenderFxDistort, 0, 0, 0, kRenderTransAdd, 127 );
}
} EDIT: Click here for the Video.