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

[L4D1] Help: Hook which survivor is an infected hunting


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
axelnieves2012
Senior Member
Join Date: Oct 2014
Location: Argentina
Old 11-07-2018 , 03:10   [L4D1] Help: Hook which survivor is an infected hunting
Reply With Quote #1

Hello everyone, I think I need some help with this.
I am working on a script for Left 4 Dead 1 (ONE).

WHAT I NEED TO KNOW:
1) I need to hook when an infected is hunting someone.
We all know if there is a Tank and 4 survivor, the Tank will hunt 1 of them at a time (it is not always the closest one).
2) I need to force that infected in specific to stop hunting that survivor gotten in step 1.

WHAT I AM TRYING TO DO?
I'm trying to do a specific NOTARGET feature.
When I get black&white, I want to force all special infecteds present (hunter, smoker, boomer and tank, not witch) stop attacking me for some seconds (as if they think I am not in the map).
But they must still attack the other survivors.

WHAT I TRIED
METHOD 1:
HookEntityOutput("trigger_look", "OnTrigger", test);
RESULT: Trigger was never called.

METHOD 2:
I tested some netprops on infecteds that I thought it was the survivor they was hunting:
netprop tested: m_clientLookatTarget,
m_fOnTarget,
m_hTargetEntity,
m_viewtarget,
m_iName,
targetname,
target,
RESULT: No one of them was a vaild result, or they have never been defined (returning runtime errors).

METHOD 3:
Changing my team to infected.
RESULT: They still think I am a survivor.

OBSERVATIONS
If I hook event HookEvent("player_incapacitated" ....), and I get incapacitated and return Plugin_Handled, special infecteds stand still as if they think I was not in the map. They dont attack me on the ground.
Maybe there is a netprop I can set to me (survivor) that make them think I am dead, unpresent or something...

POST DATA
Freezing infecteds or removing their abilities is not an option because they must keep attacking other survivors except me.

THANKS
Thanks in advance.

Last edited by axelnieves2012; 11-07-2018 at 06:24.
axelnieves2012 is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 11-07-2018 , 06:50   Re: [L4D1] Help: Hook which survivor is an infected hunting
Reply With Quote #2

General note that for m_hTargetEntity you need GetEntPropEnt and not GetEntProp
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 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 00:55.


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