Left 4 Dead 2

Left 4 Dead 2

[VScript] More Infected Over Time
Nescius 2024 年 7 月 29 日 下午 8:16
script improvement
Improved your script to be little more compatible with other modes and not break finale music. Left some comments in there too. Hopefully I made no errors

//don't overwrite the whole DirectorOptions because there are important options that need to stay there DirectorOptions.CommonLimit <- 30; DirectorOptions.MegaMobSize <- 50; DirectorOptions.MobMinSize <- 10; DirectorOptions.MobMaxSize <- 30; DirectorOptions.MobMaxPending <- 30; DirectorOptions.PreTankMobMax <- 50; DirectorOptions.BileMobSize <- 30; DirectorOptions.MaxSpecials <- 2; // as local variables you can access these anywhere below their definition in this file local okkg_last_set = 0; local okkg_randomint = 0; local okkg_isatmax = false; local okkg_leftsaferoom = false; // always put game events in your own scope for compatibility with other mods okkg_MIOT_scope <- { //no need for additional checks here it fires when survivor leave function OnGameEvent_player_left_safe_area(params) { okkg_leftsaferoom = true; } } __CollectGameEventCallbacks(okkg_MIOT_scope); // needed to register game events in okkg_MIOT_scope scope // using function named Update is fine inside mutation scripts but in generic script you risk conflict and breaking stuff function okkg_MIOT_Update() { if(Time() >= okkg_last_set + 15 && okkg_isatmax == false && okkg_leftsaferoom == true) { DirectorScript.DirectorOptions.CommonLimit++; DirectorScript.DirectorOptions.MegaMobSize++; DirectorScript.DirectorOptions.MobMinSize++; DirectorScript.DirectorOptions.MobMaxSize++; DirectorScript.DirectorOptions.MobMaxPending++; DirectorScript.DirectorOptions.PreTankMobMax++; DirectorScript.DirectorOptions.BileMobSize++; printl("CommonLimit is " + DirectorScript.DirectorOptions.CommonLimit); if(okkg_randomint == 4 && DirectorScript.DirectorOptions.MaxSpecials != 4) { DirectorScript.DirectorOptions.MaxSpecials++; printl("MaxSpecials is " + DirectorScript.DirectorOptions.MaxSpecials); okkg_randomint = 0; } okkg_last_set = Time(); okkg_randomint++; if(DirectorScript.DirectorOptions.CommonLimit == 60) { okkg_isatmax = true; } } } // There is by default an Update function defined and this registers your update function to be called too g_MapScript.ScriptedMode_AddUpdate(okkg_MIOT_Update);
< >
正在显示第 1 - 7 条,共 7 条留言
multo 2024 年 7 月 29 日 下午 8:57 
i really wanted to use this mod but without the finale music is a huge downside, but damn thank you for fixing it
Im terminally ill please help  [开发者] 2024 年 7 月 29 日 下午 9:19 
Thank you for improving it, didnt even know half of this lol, can I replace the old code in the mod with this?
Nescius 2024 年 7 月 29 日 下午 11:37 
yes
multo 2024 年 7 月 30 日 下午 10:43 
huh the finale music is still broken, i played some finales and i still cant hear both the tank finale and finale beginning music
最后由 multo 编辑于; 2024 年 7 月 30 日 下午 10:46
Nescius 2024 年 7 月 31 日 上午 12:53 
Are you sure this addon is the culprit ? Did a quick test and tank music in finales was working. Which finales have you tested ?
multo 2024 年 7 月 31 日 上午 12:55 
i tested swamp fever, no mercy and deathtoll finales and couldnt hear anything no tank music or finale start music
Nescius 2024 年 7 月 31 日 上午 12:58 
Are you sure you don't have an old version of this or some other addon causing it ?
< >
正在显示第 1 - 7 条,共 7 条留言
每页显示数: 1530 50