AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   [L4D] How to detect Is Tank Angry? (https://forums.alliedmods.net/showthread.php?t=331807)

Dragokas 04-08-2021 11:13

[L4D] How to detect Is Tank Angry?
 
2 Attachment(s)
Hi,

is there some prop or any other way?

Case: [Coop] Tank is spawned, but is not angry yet.
He becomes angry as soon as some survivor gets to him close enough, so he begins to chase survivor.

So, how to detect (yes / no) if Tank angry (chase anybody)?

PS. I tried to dump tank entity props with tEntDev,
but I don't see anything reliable in differences.

PPS. Previously, I used "m_zombieState", but it seems it's not reliable,
because it becomes 1 -> 0 as soon as m_lookatPlayer becomes X -> -1 (when tank losing the target, like player hides behind the wall).

Psyk0tik 04-08-2021 22:20

Re: [L4D] How to detect Is Tank Angry?
 
You can check my “bIsTankIdle” function in Mutant Tanks. The Tank has the “TankIdle” action when he spawns in and it changes to “TankAttack” when a survivor triggers him. There’s a rare bug in both games where the Tank can lose his target and he just stands there. His action in that scenario would just be “TankBehavior” because his behavior == action (null).

Dragokas 04-09-2021 05:47

Re: [L4D] How to detect Is Tank Angry?
 
wow, very nice work on that! Thanks.


All times are GMT -4. The time now is 20:18.

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