Left 4 Dead 2

Left 4 Dead 2

[VSCRIPT] Charger Fixes (Correct difficulty scaling + Carry Damage + no FF on carry)
8 条留言
Plat. 8 月 1 日 下午 1:39 
also can you make more SI fix addons or "collections" ?
Torch  [作者] 7 月 3 日 上午 5:42 
hey skysky199 can you help me with some coding knowledge? accept my friend request, ty
Torch  [作者] 6 月 19 日 上午 10:23 
Hey @skysky199 I edited the code and managed to apply 2. and 3. ty for the help
skysky199 6 月 19 日 上午 9:46 
1.
You should place all your OnGameEvent_* functions inside the ChCh_ChargeImpactDMG table.
And suggest rename the table, or this will be conflict with the original one.

2.
Don't use OnGameplayStart(), use OnGameEvent_round_start_post_nav(params), or call the initialization function below itself instead. (In your case, initializing via a function is actually unnecessary.)
For example:
function aaa()
{
//do something
}
aaa();

3.
I think the difficulty-related part in the OnGameEvent_charger_charge_start is unnecessary.
Btw, this event may be called more than once per ability use. I'm not entirely sure what your intention is here, so consider this just a friendly reminder.

4.
GetDifficulty() will return 0 on Easy, so the damage will always be zero.
Besides, I suggest using a look-up table for non-linear damage scaling, but you can still simply use
if(diff == 0)
...TakeDamage(5.0, ...);
else if(diff == 1)
...TakeDamage(5.0, ...);
...
(should not ignore "else".)
Billy 6 月 18 日 下午 3:54 
could you change the chargers grab on easy to 5 damage (same as normal) to match the scaling
Torch  [作者] 6 月 18 日 下午 2:10 
We need more Mods including him as thumbnail.
Morsch 6 月 18 日 下午 2:07 
GTA San Andreas Charger my beloved.