Raised This Month: $32 Target: $400
 8% 

HL-Style Holographic Effect


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fezh
Veteran Member
Join Date: Dec 2008
Location: BANNED
Old 07-14-2010 , 20:28   HL-Style Holographic Effect
Reply With Quote #1

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.
PHP Code:
#include <amxmodx>
#include <engine>

const IDDLE7_SEQUENCE 18;

new 
g_szModel[ ] = { "models/scientist.mdl" };

public 
plugin_precache( )
{
    
precache_modelg_szModel );
}

public 
plugin_init( )
{
    
register_clcmd"say /hologram""ClCmd_Hologram" );
}

public 
ClCmd_Hologramid )
{
    new 
iEnt create_entity"info_target" );
    
    if ( 
is_valid_entiEnt ) )    
    {
        
entity_set_stringiEntEV_SZ_classname"hlstyle_hologram" );
        
        new 
Float:fOrigin];
        
        
entity_get_vectoridEV_VEC_originfOrigin );
        
        
fOrigin] += 50.0;
        
        
entity_set_originiEntfOrigin );
        
        
entity_set_modeliEntg_szModel );
        
        
entity_set_intiEntEV_INT_sequenceIDDLE7_SEQUENCE );
        
        
entity_set_intiEntEV_INT_solidSOLID_NOT );
        
        
drop_to_flooriEnt );
        
        
set_renderingiEntkRenderFxDistort000kRenderTransAdd127 );
    }

Will add a short example video to show this simple plugin in action.

EDIT: Video.
__________________
"There is no knowledge, that is not power"

Last edited by fezh; 07-14-2010 at 21:20.
fezh is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 07-14-2010 , 21:58   Re: HL-Style Holographic Effect
Reply With Quote #2

Awesome.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
5c0r-|3i0
Veteran Member
Join Date: Nov 2008
Location: Việt Nam
Old 07-15-2010 , 00:38   Re: HL-Style Holographic Effect
Reply With Quote #3

Wow...Kool..
5c0r-|3i0 is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 07-15-2010 , 02:50   Re: HL-Style Holographic Effect
Reply With Quote #4

Really really cool....but what if the origin is outside,,,,
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
lazarev
Veteran Member
Join Date: Sep 2008
Old 07-15-2010 , 04:29   Re: HL-Style Holographic Effect
Reply With Quote #5

set_rendering( iEnt, kRenderFxDistort, 0, 0, 0, kRenderTransAdd, 127 );

does the job :/

lazarev is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-15-2010 , 06:01   Re: HL-Style Holographic Effect
Reply With Quote #6

Yes, you should explain you need only one line with set_rendering(), some people may not understand.
__________________
Arkshine is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 07-15-2010 , 06:06   Re: HL-Style Holographic Effect
Reply With Quote #7

One question... what is this?

PHP Code:
entity_set_intiEntEV_INT_sequenceIDDLE7_SEQUENCE ); 
sequence are sequence of movements right? and what exactly is IDDLE7_SEQUENCE? i can't find it in hldsk_const.inc
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...

Last edited by Alucard^; 07-15-2010 at 06:09.
Alucard^ is offline
Send a message via Skype™ to Alucard^
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-15-2010 , 06:12   Re: HL-Style Holographic Effect
Reply With Quote #8

const IDDLE7_SEQUENCE = 18;

Look at the sciencist model, not hlsdk_const.inc...
__________________
Arkshine is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 07-15-2010 , 09:32   Re: HL-Style Holographic Effect
Reply With Quote #9

And how to look at a model? using a program to open models or with another method?
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
5c0r-|3i0
Veteran Member
Join Date: Nov 2008
Location: Việt Nam
Old 07-15-2010 , 09:39   Re: HL-Style Holographic Effect
Reply With Quote #10

Using a program , Half Life model viewer :d
__________________
5c0r-|3i0 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 06:25.


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