Raised This Month: $51 Target: $400
 12% 

[L4D2] Instructor Hint when Dead


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 03-06-2019 , 22:20   [L4D2] Instructor Hint when Dead
Reply With Quote #1

Is there any way to display Instructor Hint when the client is dead?

Looks like that when a client is dead the hint doesn't show up.
I don't know if it's some limitation from the engine or if I'm doing something wrong.

I'm using this code to display:
Code:
                int entity = CreateEntityByName("env_instructor_hint");
                char sInstructorHintTarget[64];
                Format(sInstructorHintTarget, sizeof(sInstructorHintTarget), "hint%d", client);
                DispatchKeyValue(client, "targetname", sInstructorHintTarget);
                DispatchKeyValue(entity, "hint_target", sInstructorHintTarget);
                DispatchKeyValue(entity, "hint_timeout", "10");
                DispatchKeyValue(entity, "hint_caption", "Test IH");
                DispatchKeyValue(entity, "hint_icon_onscreen", "icon_info");
                DispatchKeyValue(entity, "hint_color", "255 0 0");
                DispatchSpawn(entity);
                AcceptEntityInput(entity, "ShowHint", client);
                SetVariantString("OnUser1 !self:Kill::6:1");
                AcceptEntityInput(entity, "AddOutput");
                AcceptEntityInput(entity, "FireUser1");
Marttt is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 03-07-2019 , 00:38   Re: [L4D2] Instructor Hint when Dead
Reply With Quote #2

You can try and fire the event directly to the client, this is what the entity sends to the clients i think anyway.

PHP Code:
Handle hevent CreateEvent("instructor_server_hint_create"true); 
Mastermind has played with this stuff alot maybe he knows more.
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D
Lux is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 03-07-2019 , 16:25   Re: [L4D2] Instructor Hint when Dead
Reply With Quote #3

I tried but it also did not work. It does not seem to work when the client is dead or in ghost mode.

Here is the script I used to test. Just type "!test" in chat to show the instructor hint.

Anyway thanks Lux.
Attached Files
File Type: sp Get Plugin or Get Source (instructor.sp - 315 views - 5.1 KB)

Last edited by Marttt; 03-21-2022 at 05:26.
Marttt is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 03-15-2019 , 18:25   Re: [L4D2] Instructor Hint when Dead
Reply With Quote #4

I have another question, will be glad if someone can help me.
It's not based on the thread title.

How I can attach the instructor hint to another entity?

Let's say I created an entity and added it to a random special infected.

How to make the instructor hint shows attached to the special infected and not in "my hud" screen?
Marttt is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 03-15-2019 , 20:59   Re: [L4D2] Instructor Hint when Dead
Reply With Quote #5

Quote:
Originally Posted by Marttt View Post
I have another question, will be glad if someone can help me.
It's not based on the thread title.

How I can attach the instructor hint to another entity?

Let's say I created an entity and added it to a random special infected.

How to make the instructor hint shows attached to the special infected and not in "my hud" screen?
https://forums.alliedmods.net/showthread.php?p=2557997

Maybe what you looking for.
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D
Lux is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 01-12-2020 , 18:24   Re: [L4D2] Instructor Hint when Dead
Reply With Quote #6

Sorry i'm late to this discussion but in all my attempts to manipulate instructor hints to show while dead or spectating have failed....however during one test i did I swear to god I got them to show briefly while spectating, however trying to reproduce it failed. I think it's possible but has to be done another way...if I discover how to do it I will share the info...but as of now it's a no go. Ithink the problem is that the players entity changes into something else or doesn't exist and the hint has trouble attaching to it...I don't know for sure though.

Last edited by MasterMind420; 01-12-2020 at 18:32.
MasterMind420 is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 01-13-2020 , 16:04   Re: [L4D2] Instructor Hint when Dead
Reply With Quote #7

Hey, thanks for the reply Master,

Since I posted this I improved a bit my understanding of SM,

BTW I think this limitation is more related to the engine and to the entity of course

Maybe modifying the call from "gamedata" (in case it has any) could enable this, but I'm not sure since I don't understand much about it.

Also, unfortunately, looks like the "SetTransmit" hook doesn't apply to the env_instructor_hint [Already reported by You and Lux in another thread].
__________________
Marttt is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 01-13-2020 , 16:12   Re: [L4D2] Instructor Hint when Dead
Reply With Quote #8

Might be client side limitation. Nothing in server binary suggests it's excluding dead players.
__________________
Silvers is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 01-13-2020 , 16:33   Re: [L4D2] Instructor Hint when Dead
Reply With Quote #9

Quote:
Originally Posted by Marttt View Post
Hey, thanks for the reply Master,

Since I posted this I improved a bit my understanding of SM,

BTW I think this limitation is more related to the engine and to the entity of course

Maybe modifying the call from "gamedata" (in case it has any) could enable this, but I'm not sure since I don't understand much about it.

Also, unfortunately, looks like the "SetTransmit" hook doesn't apply to the env_instructor_hint [Already reported by You and Lux in another thread].
No problem...recently i've been dabbling with it again...trying some things. i'll report back here if i find anything
MasterMind420 is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 01-13-2020 , 16:36   Re: [L4D2] Instructor Hint when Dead
Reply With Quote #10

Quote:
Originally Posted by Silvers View Post
Might be client side limitation. Nothing in server binary suggests it's excluding dead players.
yah i suspected that may be the case...but i can almost swear i made it work once inconsistently...and i haven't been able to reproduce it...i told lux that the idle hint to press left mouse to join is there...wether we can gain access to what displays it is another story...client sided probably...but i dont know. dead or idle players are spectating a player...bot or otherwise. im thinking maybe the view has changed...like the entity your looking thru...hence why its not displaying...its displaying to the wrong entity maybe? but thats just a far fetched guess at best. i messed with trying to make it work for awhile and ultimately gave up.

Last edited by MasterMind420; 01-13-2020 at 16:40.
MasterMind420 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 15:35.


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