Raised This Month: $ Target: $400
 0% 

[L4D2] Let Certain Players See Glow


Post New Thread Reply   
 
Thread Tools Display Modes
comp_noob
Senior Member
Join Date: Nov 2010
Old 11-14-2010 , 01:26   Re: [L4D2] Let Certain Players See Glow
Reply With Quote #11

Quote:
Originally Posted by FaTony View Post
SetTransmit info:


Also, I have seen glows in realism on Heroboy server. (Bad russian server with shitload of plugins in it).
So it only blocks the entire entity from being seen by players? aww that's not what i wanted... i only wanted to block the glow from being seen =( in realism servers, there's a cvar which u can set to enable survivor glows back if i'm not wrong (sv_glowenable, sv_disable_glow_survivors)... i do not want to disable the glows, i just want to block the glows from being seen by certain players...
comp_noob is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 11-14-2010 , 04:49   Re: [L4D2] Let Certain Players See Glow
Reply With Quote #12

Hide the player and there will be no glow.
__________________
FaTony is offline
comp_noob
Senior Member
Join Date: Nov 2010
Old 11-14-2010 , 04:55   Re: [L4D2] Let Certain Players See Glow
Reply With Quote #13

Quote:
Originally Posted by FaTony View Post
Hide the player and there will be no glow.
i can hide the player when he's not visible, but after that, how can i unhide him when he's visible? i can't even use the visible check when he's being hidden O_O
comp_noob is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 11-14-2010 , 07:56   Re: [L4D2] Let Certain Players See Glow
Reply With Quote #14

Of course you can. It's hidden only in client, not in server. Just return Plugin_Continue to make player visible again to clients.
__________________
FaTony is offline
comp_noob
Senior Member
Join Date: Nov 2010
Old 11-14-2010 , 08:25   Re: [L4D2] Let Certain Players See Glow
Reply With Quote #15

thanks Fatony, i wanna ask, how do you check if a player is directly visible to a person or not? do you use the event entity_visible or something else? sorry, i'm noob to this type of things, i don't know how to script one that checks for visibility of an entity... by the way, is there any way that you can create an entity that is a glow around the player? or like a name above a player? so that i can use the SetTransmit hook to set whether the entity will be shown to a player or not...
comp_noob is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 11-15-2010 , 02:59   Re: [L4D2] Let Certain Players See Glow
Reply With Quote #16

Visibility... I've been thinking on it. The bullet-proof method is to determine 3 visible sides ofa player's bounding box and trace rays to a 1x1 grid on all sides... That will probably lag much. However, by testing, I've found that tracing about 4000 rays OnGameFrame caused only slight lag when you are running both dedicated server and client on the same machine. Start with TR_TraceRay. Dunno about glows, haven't scripted for L4D1/2 much.

EDIT: I forgot to mention that on Heroboy server, they glow only show up when the player is very far. They've somehow set a starting distance of a glow. So you technically can set starting distance of 64000 units... I wonder if it's player specific.
__________________

Last edited by FaTony; 11-15-2010 at 03:12.
FaTony is offline
comp_noob
Senior Member
Join Date: Nov 2010
Old 11-15-2010 , 07:25   Re: [L4D2] Let Certain Players See Glow
Reply With Quote #17

Quote:
Originally Posted by FaTony View Post
Visibility... I've been thinking on it. The bullet-proof method is to determine 3 visible sides ofa player's bounding box and trace rays to a 1x1 grid on all sides... That will probably lag much. However, by testing, I've found that tracing about 4000 rays OnGameFrame caused only slight lag when you are running both dedicated server and client on the same machine. Start with TR_TraceRay. Dunno about glows, haven't scripted for L4D1/2 much.

EDIT: I forgot to mention that on Heroboy server, they glow only show up when the player is very far. They've somehow set a starting distance of a glow. So you technically can set starting distance of 64000 units... I wonder if it's player specific.
pradon me, but i've always thought that TR_TraceRay always trace in a straight line, it also can be used to trace visible corners in the player's sight? wow, then it must be real hard... i don't know much about the traceray part, so can this code be used to trace?
PHP Code:
stock SetTeleportEndPoint(client)
{
    
decl Float:vAngles[3], Float:vOrigin[3], Float:vBuffer[3], Float:vStart[3], Float:DistanceHandle:trace;
    
GetClientEyePosition(client,vOrigin);
    
GetClientEyeAngles(clientvAngles);
    
    
trace TR_TraceRayFilterEx(vOriginvAnglesMASK_SHOTRayType_InfiniteTraceEntityFilterPlayer);
        
    if(
TR_DidHit(trace))
    {        
            
TR_GetEndPosition(vStarttrace);
        
GetVectorDistance(vOriginvStartfalse);
        
Distance = -35.0;
            
GetAngleVectors(vAnglesvBufferNULL_VECTORNULL_VECTOR);
        
g_pos[0] = vStart[0] + (vBuffer[0]*Distance);
        
g_pos[1] = vStart[1] + (vBuffer[1]*Distance);
        
g_pos[2] = vStart[2] + (vBuffer[2]*Distance);
    }
    
    
CloseHandle(trace);
    return 
true;
}

public 
bool:TraceEntityFilterPlayer(entitycontentsMask)
{
    return 
entity MaxClients || !entity;

comp_noob is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 11-15-2010 , 08:12   Re: [L4D2] Let Certain Players See Glow
Reply With Quote #18

http://forums.alliedmods.net/showpos...0&postcount=13
__________________
FaTony is offline
comp_noob
Senior Member
Join Date: Nov 2010
Old 11-15-2010 , 09:30   Re: [L4D2] Let Certain Players See Glow
Reply With Quote #19

does that work for l4d2 also? is there anything that i need to change? sorry, i don't know about the traceray stuff... so i can't tell if there's anything wrong...
comp_noob is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 11-16-2010 , 06:31   Re: [L4D2] Let Certain Players See Glow
Reply With Quote #20

TraceRay should work with all mods. I suggest trying to write from scratch and using my code as reference.
__________________
FaTony 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 21:07.


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