AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Can't spectate invisible player (https://forums.alliedmods.net/showthread.php?t=61994)

alien 10-15-2007 21:49

Can't spectate invisible player
 
Once again, I have a problem I'm not able to solve. I'm using set_entity_visibility to make players invisible and vice versa. What I don't uderstand is why someone can't spectate invisible player?

As soon as someone being spectated becomes invisible, the spectator will loose focus and will gain Free Look.

Do you think there's a way this could be solved by?

What I was thinking about:

1) Player will become invisible
2) All spectators will be check for iuser2 equal to that player
3) It will be stored ... and ... well I don't know ... restored on next frame?

I have noone to try with at this time ... but I'll appreciate any suggestions!!!
Thank you. :|

[ --<-@ ] Black Rose 10-16-2007 12:02

Re: Can't spectate invisible player
 
Use this instead then.
Code:
Invisible: set_user_rendering(index, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0); Visible: set_user_rendering(index, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255);

alien 10-16-2007 13:49

Re: Can't spectate invisible player
 
Thank you, Black Rose ... but I was trying to avoid set_user_rendering. But it's probably the only option.

EDIT: Actually, would this affect FPS somehow?

M249-M4A1 10-16-2007 13:57

Re: Can't spectate invisible player
 
Quote:

Originally Posted by alien (Post 542751)
Thank you, Black Rose ... but I was trying to avoid set_user_rendering. But it's probably the only option.

EDIT: Actually, would this affect FPS somehow?

No (if u make them invisible)

ConnorMcLeod 10-16-2007 14:18

Re: Can't spectate invisible player
 
fun :
Code:
set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0)

fakemeta
Code:
set_pev(id, pev_renderfx, kRenderFxGlowShell) set_pev(id, pev_rendercolor, {0.0, 0.0, 0.0} ) set_pev(id, pev_rendermode, kRenderTransAlpha) set_pev(id, pev_renderamt, 0.0)

kp_uparrow 10-16-2007 20:33

Re: Can't spectate invisible player
 
you would have to use PreThink because glow dissappears on CurWeapon and other stuff

ConnorMcLeod 10-17-2007 04:04

Re: Can't spectate invisible player
 
Quote:

Originally Posted by kp_uparrow (Post 542882)
you would have to use PreThink because glow dissappears on CurWeapon and other stuff

uh ?

purple_pixie 10-17-2007 05:41

Re: Can't spectate invisible player
 
That's [connorr's way] how (U)WC3 does it ... I'm pretty sure that hangs around ;-)

Arkshine 10-17-2007 06:25

Re: Can't spectate invisible player
 
Glow will disappear only if there are others plugins using glow. So, whatever fun or fakemeta way, it won't disappear.

[ --<-@ ] Black Rose 10-17-2007 14:25

Re: Can't spectate invisible player
 
Quote:

Originally Posted by kp_uparrow (Post 542882)
you would have to use PreThink because glow dissappears on CurWeapon and other stuff

Don't ever mention PreThink again... You gave yourself the answer...

CurWeapon and ResetHUD should be enough.


All times are GMT -4. The time now is 01:12.

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