Originally Posted by Kai0205
I'm so sorry that I don't understand English, I want to ask something briefly.
This plugin will replace "[L4D2] Left 4 Downtown 2" ?
Originally Posted by TiTz
But on booting the server I got this error
Thanks, fixed. Forgot to add a check to exclude L4D1 from Director Variables fix.
Originally Posted by hoanganh81097
native L4D_OnGetScriptValueInt still wont work. Plugin cant spawn more "MaxSpecials"
Well it's definitely being read again.
Maybe the director already has the value and won't change when reading a new one, but that doesn't seem right since on some maps the var is triggered many times during gameplay and dynamically changed.
Edit: so I added this to test, used z_spawn hunter, and it was limiting the number of special infected allowed to spawn. Each time I used z_spawn it would trigger "MaxSpecials" below. See the results:
public Action L4D_OnGetScriptValueInt(const char key, int &retVal)
if (StrEqual(key, "MaxSpecials") )
PrintToServer("TEST_FWD ############## %s %d", key, retVal);
retVal = -1; // No specials can spawn.
retVal = 0; // 1 special can spawn.
retVal = 1; // 2 specials can spawn.
It's strange setting the value to 1 less than the amount you want to spawn, but that's just how it seems to work. That's the games odd behaviour, left4dhooks isn't randomly setting -1 on the variable you change.
When left4dhooks starts, it calls the variable "MaxSpecials" which triggers the "L4D_OnGetScriptValueInt" forward with "MaxSpecials" variable.
If there are any other director variables not being set because they're triggered too early let me know and I'll add them to also trigger forwards when the plugin starts.
- AnimHooks no longer affect the same client index if the previous user disconnected and someone else connected.
- Clarified AnimHooks details in the include file. All AnimHooks are removed on map change.
- Fixed L4D1: "Invalid Handle" errors caused by Director Variables fix. Thanks to "TiTz" for reporting.