Left 4 Dead 2

Left 4 Dead 2

768 arvostelua
Super Knockback Tanks
9
2
   
Palkinto
Lisää suosikkeihin
Lisätty suosikkeihin
Poista suosikeista
Game Content: Scripts
Game Modes: Single Player, Co-op
Tiedostokoko
Julkaistu
2.817 KB
13.12.2024 klo 16.22
1 muutos ( näytä )

Tilaa ladataksesi
Super Knockback Tanks

1 kokoelmassa, tekijä Geebanger0
Special Infected Modification Program (S.I.M.P)
6 luomusta
Kuvaus
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...
Suositut keskustelut Näytä kaikki (1)
2
19.12.2024 klo 14.45
werwerewr
Zadiswa
129 kommenttia
not_requested49 5.12. klo 8.26 
nice, i was thinking about having this and now i dont have to make it myself
pech 19.11. klo 8.40 
watch yo tone
Isolda 5.9. klo 16.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 5.9. klo 16.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 5.9. klo 16.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 5.9. klo 15.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  [tekijä] 5.9. klo 15.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  [tekijä] 5.9. klo 15.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 5.9. klo 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 5.9. klo 10.25 
nevermind the mod worked