Left 4 Dead 2

Left 4 Dead 2

768 个评价
Super Knockback Tanks
9
2
   
奖励
收藏
已收藏
取消收藏
Game Content: Scripts
Game Modes: Single Player, Co-op
文件大小
发表于
2.817 KB
2024 年 12 月 13 日 下午 4:22
1 项改动说明 ( 查看 )

订阅以下载
Super Knockback Tanks

在 Geebanger0 的 1 个合集中
Special Infected Modification Program (S.I.M.P)
6 件物品
描述
The Jockey modification program was a huge success. So much so that the eggheads in the lab suggested we expand our research to include the other infected variants. Our military contract for the Rocket Jockeys raked in around $75 Million. You know how many kinds of steroids you can buy for $75 Million? It's a lot. Whole shipping containers full of 'em. Then we stuck every last one into a bunch of Tanks just to see what'd happen. Turns out, it kills them. A couple were lucky enough to not suffer an immediate heart attack however, and now you can fight them. Just don't get punched...
热门讨论 查看全部(1)
2
2024 年 12 月 19 日 下午 2:45
werwerewr
Zadiswa
129 条留言
not_requested49 12 月 5 日 上午 8:26 
nice, i was thinking about having this and now i dont have to make it myself
pech 11 月 19 日 上午 8:40 
watch yo tone
Isolda 9 月 5 日 下午 4:11 
And just to be clear: no lag/jittering (associated with Coldfront) while trying to recreate it privately in single player (but I know it happened hosting local). The error still happens on vanilla maps and Coldfront alike.
Isolda 9 月 5 日 下午 4:02 
The full error is:
AN ERROR HAS OCCURED [the index 'GetActiveWeapon' does not exist]

CALLSTACK
*FUNCTION [OnGameEvent_player_hurt()] c:/program files (x86)/steam/steamapps/common/left 4 dead 2/left4dead2/addons/workshop/3383897874.vpk/scripts/vscripts/director_base_addon.nut line [7]
*FUNCTION [__RunEventCallbacks()] unnamed line [211]
*FUNCTION [__RunGameEventCallbacks()] unnamed line [218]

LOCALS
[attacker] INSTANCE
[victim] INSTANCE
[event] TABLE
[this] TABLE
[funcName] "OnGameEvent_player_hurt"
[idx] 0
[useTable] TABLE
[bWarnIfMissing] false
[globalTableName] "GameEventCallbacks"
[prefix] "OnGameEvent_"
[params] TABLE
[event] "player_hurt"
[this] TABLE
[params] TABLE
[event] "player_hurt"
[this] TABLE
Isolda 9 月 5 日 下午 4:02 
With every mod unchecked and non-workshop mods moved out of the way, the error still occurs, except this time it appears the fall damage causes the console error, not the Tank punch. I have locally hosted Coldfront a few times with this script on (and I was aware of this at first harmless console error), where the framerate became jittery for everyone when the Tank fight happens halfway through the map (which spammed the error in console if memory serves right).

Launching through console in single player does not cause jittering (but the error persists). I remember killing the Tank removed the stuttering, and no other Tank in the campaign caused that (including the following finale Tanks). At first console glance, Coldfront modifies and is loading a director_base_addon script, but I don't understand why it would cause that.
kurochama 9 月 5 日 下午 3:40 
Actually "GetActiveWeapon" is tricky sometimes. Sometimes, you'll need to add some checks like this to prevent "does not exist" error on console:
if(!player.GetActiveWeapon() || !player.GetActiveWeapon().IsValid())
{
return;
}

& although it triggers some errors, usually it won't cause lag unless if it's spammed continuously via timer or regular tick.
Geebanger0  [作者] 9 月 5 日 下午 3:14 
If you wouldn't mind, could you do a couple more tests?

- Try it on a vanilla map like Dead Center with no other mods enabled, just to confirm that the script is working.

- If it is working, see if you get lag on any map other than coldfront 5.
Geebanger0  [作者] 9 月 5 日 下午 3:11 
heres how the script works

when a player takes damage
- get the ID of the player and the attacker
- check which weapon the attacker was using
if the attacker was using a tank_claw
- give the player massive upward velocity

from your error, it looks like its failing at the "check which weapon the attacker was using" step. If the script fails in that way, it shouldn't have any lag related impact, it should just stop.
Isolda 9 月 5 日 上午 10:32 
When a Tank punches a survivor, I get this console error: "AN ERROR HAS OCCURED [the index 'GetActiveWeapon' does not exist]" referencing line 7 on this script. On Coldfront map 5, it has caused massive lag spikes just when a Tank is alive, so I unfortunately can't run this script without worrying about that. Is there any solution you can come up with for this?
Qxxqwas 9 月 5 日 上午 10:25 
nevermind the mod worked