Left 4 Dead 2

Left 4 Dead 2

M60 Stumbles Specials
37 条留言
CBOLλ 10 月 2 日 上午 11:24 
I've added this item to my modpack, i would appreciate if you could review it and leave an feedback! https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3493928623&savesuccess=1
T626 2 月 21 日 下午 2:32 
@Wenda Got it over and done with! Thank you sm for your help, Wenda!!
Zombie  [作者] 2 月 18 日 下午 3:31 
ill make an ems later tho
Zombie  [作者] 2 月 18 日 下午 3:31 
the .nut file in the addon vpk
T626 2 月 18 日 下午 2:11 
@Wenda Then where do I put in the information that you gave me? In the in-game developer console?
Zombie  [作者] 2 月 18 日 下午 2:01 
@T626 there isnt one yet
T626 2 月 18 日 下午 1:13 
@Wenda What's the name of the ems file? And where do I find it?
Anzal 2 月 18 日 上午 3:18 
Is that Dandy World Poster?
Zombie  [作者] 2 月 17 日 下午 5:26 
@T626 change:
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
T626 2 月 17 日 下午 5:21 
@Wenda Is there a way to edit this so that it does stumble all the special infected, including chargers and tanks? Because I have a sick minigun mod by @Lt. Rocky that replaces the M60 that would go along perfectly with that.
Zombie  [作者] 2 月 17 日 下午 1:15 
no, but i can figure out how to do it
Xenorvya 2 月 17 日 下午 1:11 
Is there EMS settings to disable the Witch in this?
Alpha 2 月 17 日 上午 6:58 
@Wenda
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 :(
Zombie  [作者] 2 月 17 日 上午 5:20 
@Milcoенг why did this auto hide the comments
Milcoенг 2 月 17 日 上午 4:50 
0890
780
78
07
80780
Gojo 2 月 16 日 下午 1:33 
WHAT THATS MY WORK SHOP
Zombie  [作者] 2 月 16 日 上午 9:59 
@zAcasalamentoman tumtara
zAcasalamentoman 2 月 16 日 上午 9:58 
@Wenda what is the name of this map?
JohnsonCereal986 2 月 15 日 下午 10:18 
ew dandys sprunki
Crimson321 2 月 15 日 下午 8:07 
why do i see dw poster's
Zombie  [作者] 2 月 14 日 上午 7:59 
oh, again, thank you a lot
4512369781 2 月 14 日 上午 7:54 
One more thing, non-bullet damage should also be filtered out first. For example, if you throw a molotov, then switch to M60, then zombies will dance in the fire.

Add this code in the "if"method that checks the weapon.
&& (params.type & DirectorScript.DMG_BULLET) == DirectorScript.DMG_BULLET
Zombie  [作者] 2 月 14 日 上午 7:48 
oh thank you again
4512369781 2 月 14 日 上午 7:28 
@Wenda
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 )
Zombie  [作者] 2 月 14 日 上午 6:50 
@Alpha I looked at your awp script but i cant find what you are refering to in them? it doesnt seem to use posion at all
Zombie  [作者] 2 月 14 日 上午 6:20 
@4512369781 thank you
4512369781 2 月 14 日 上午 2:20 
hi, you can filter minigun by this:
if (NetProps.GetPropInt(attacker, "m_usingMountedWeapon")) return;
Both OnGameEvent_infected_hurt and OnGameEvent_player_hurt need it.
Alpha 2 月 13 日 上午 6:28 
Oh I know what happend to you.
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.
Zombie  [作者] 2 月 13 日 上午 6:11 
how do i prevent TakeDamage() from crashing the game
Alpha 2 月 13 日 上午 6:10 
Yes, there will be 2 events in your "M60Stumble" domain, OnGameEvent_infected_hurt and OnGameEvent_player_hurt, that's all.
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.
Zombie  [作者] 2 月 13 日 上午 5:54 
also the current code works fine, it was just when i tried to add more it stopped
Zombie  [作者] 2 月 13 日 上午 5:51 
atleast according to the braces they are
Zombie  [作者] 2 月 13 日 上午 5:49 
both of them are in it?
Alpha 2 月 13 日 上午 5:47 
In you script, I find there are two group of "OnGameEvent_infected_hurt" and "OnGameEvent_player_hurt". One in "M60Stumble" then uses "__CollectGameEventCallbacks" to load, the other is out of it.
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.
Zombie  [作者] 2 月 13 日 上午 5:23 
i tried implimenting a change based on yours, but it somehow made the game not recognize OnGameEvent_infected_hurt anymore and give no error as to why. OnGameEvent_player_hurt still works fine and infected_hurt works fine in other scripts. idk what the issue is
Zombie  [作者] 2 月 13 日 上午 4:24 
@alpha oh thank you a lot
Alpha 2 月 13 日 上午 4:10 
I've just seen the source code, and there will be a bug I guess.
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.