Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
if(victim.IsPlayer() && victim.GetZombieType() == 8 || victim.IsPlayer() && victim.GetZombieType() == 6 || victim.IsPlayer() && victim.GetZombieType() == 9) //tank, charger, survivor
to:
if(victim.IsPlayer() && victim.GetZombieType() == 9) //survivor
Sorry, my bad. POSION is my eariler version.
I forget that I have updated my script. Now infected_hurt filter damage by DMG_BULLET, and use takedamage by DMG_BLAST, so that the listener won't be a dead-loop.
So sorry to confuse you :(
780
78
07
80780
Add this code in the "if"method that checks the weapon.
&& (params.type & DirectorScript.DMG_BULLET) == DirectorScript.DMG_BULLET
You're welcome.
About what @Alpha said, he should mean that you need to filter the damage type, after you use "DMG_BLAST" to stumble witch, you need to end the function by check the damage type to avoid crashing.
like this: if( victim.GetClassname() == "witch" && (params.type & DirectorScript.DMG_BLAST) != DirectorScript.DMG_BLAST )
if (NetProps.GetPropInt(attacker, "m_usingMountedWeapon")) return;
Both OnGameEvent_infected_hurt and OnGameEvent_player_hurt need it.
Your game is crashed by an infinity "takedamage", cause takedamage lead to takedamage again.
To figure it out, you must add another damage type (like posion, my choice), then make the listener step over this type, then the listener won't be trigger by your "stumble-damage" and finish correctly.
Damage type is bit data. you can combine them with "|" like "blast | posion"(you can find the const name at doc or ask AI). When judege type, you can use "type & posion" to check the damage.
You can check my mod and take a look at the source code, there are detailed solution.
BTW, witch is entity, not player. The Class Entity has not function "Stagger()". So the only way to stumble witch is using "TakeDamage" and wih type "DMG_BLAST".
After all, using "OnGameEvent_infected_hurt" to listen witch and stumble her by "TakeDamage()", using "OnGameEvent_player_hurt" to listen other SI and stumble them by "Stagger()". Then put these 2 event into you custom domain "M60Stumble", and load with "__CollectGameEventCallbacks".
I think it will be OK in this way.
You should make sure all events are in the a custom domain(M60Stumble) and uses "__CollectGameEventCallbacks" to load, do not write it at root domain, otherwise it will lead to bugs that make same-name-events invalid.
This bug won't print any logs, cause it just override other events, no logic error.
So you can try to remove the events that out of "M60Stumble", and check it again.
You can take the M60 and use minigun to shoot the witch, she will be stumbled, unexpected.
In fact, the function "attacker.GetActiveWeapon().GetClassname()" will still return the weapon you just taken when you use stable weapons.
Besides, other-type damage from you also produces effects such as fire or explode on witch, but it's override by other special effect, you can check it on the log.
You can take a look at my vscript in "AWP script" (the part of "on_infected_hurt"), and use it on your m60.