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

[TF2] Simulated observation


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mr_panica
Senior Member
Join Date: Jan 2017
Location: Russia, Saint-Petersburg
Old 09-26-2020 , 16:59   [TF2] Simulated observation
Reply With Quote #1

Hello.
I have not been able to solve the problem for a long time. How to make the health and name of a player visible to other players.

Moreover, this must be done through the system built into the game.
The "mod see enemy health" attribute does not work on players if their class is not a Spy, Medic, and Heavy (heavy WTF??).


So, it can be simulated so that the player observes through the "observer" mode (as in the screenshot)

Well, or is there any other solution to my problem?

I know that players can attach a health display, like in MvM mode, but I also need to display the player's name.

Better yet, a separate display of the player's name and health, so that I could give players access to view the health or player name.

__________________
Sorry for my English.
Mr_panica is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 09-26-2020 , 23:07   Re: [TF2] Simulated observation
Reply With Quote #2

I tested Attribute 269 "mod see enemy health" on the primary weapon of all classes and it allowed me to see the health of enemy players when I looked at them.

To allow a player to view outline of all team members you can use TF2_AddCondition to give TFCond_SpawnOutline. Here's an example of giving it with no timelimit:
TF2_AddCondition(client, TFCond_SpawnOutline, -1.0);
PC Gamer is offline
Mr_panica
Senior Member
Join Date: Jan 2017
Location: Russia, Saint-Petersburg
Old 09-27-2020 , 02:35   Re: [TF2] Simulated observation
Reply With Quote #3

Quote:
Originally Posted by PC Gamer View Post
I tested Attribute 269 "mod see enemy health" on the primary weapon of all classes and it allowed me to see the health of enemy players when I looked at them.

To allow a player to view outline of all team members you can use TF2_AddCondition to give TFCond_SpawnOutline. Here's an example of giving it with no timelimit:
TF2_AddCondition(client, TFCond_SpawnOutline, -1.0);

Yes, but as I said before, "mod see enemy health" does not show the names of the players (leaves the field blank)

And yes, I issue set outline via "SetEntProp (client, Prop_Send," m_bGlowEnabled ", 1, 1);".
But your method is interesting, I did not know that there is such a cond.
__________________
Sorry for my English.
Mr_panica is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 09-27-2020 , 06:53   Re: [TF2] Simulated observation
Reply With Quote #4

You're probably stuck with the limitations provided; all you can do is manipulate one of those conditions (target on same team, is local player spy / medic / heavy / in dying state / in spectate, is enemy disguised) if you want the native display with the name rendered.

That's all handled on the client, and those are the only things that allow it (as of the Jungle Inferno code leak, at least).

I wrote up a "show enemy info" utility library for a project I previously worked on, which uses either center text or synchud (in a separate branch) to selectively display name / health / ubercharge based on the bits set on a global forward.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)

Last edited by nosoop; 09-27-2020 at 07:00.
nosoop 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 13:58.


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