Left 4 Dead 2

Left 4 Dead 2

Stable Third-person Shotgun Sound Fix script
42 条留言
HazyAPI 11 月 5 日 上午 9:43 
Nice job! this is the only one works on the dedicated server. You can hear yourself and your teammates shotgun firing sound, whether in first-person or third-person perspective.
Unfortunately, in first-person view, the shotgun sound effect plays twice almost every time a shot is fired and i can't see the laser effect of my own gun in third-person view. :steamsad: Is there any way to solve this?
Wabisuke 10 月 30 日 上午 1:01 
@Shadowysn
Thanks for your information. Now I can confidently tackle more complex approaches.
Shadowysn  [作者] 10 月 30 日 上午 12:14 
@Wabisuke 4 Dead
I understand now. Unfortunately I know no method that can let you move the first-person camera around without moving the arms.
Wabisuke 10 月 29 日 上午 11:49 
@Shadowysn I meant to ask whether it would be possible to move the viewmodel camera independently of the arm.
Shadowysn  [作者] 10 月 29 日 上午 11:31 
I forgot to add that the origin and angles are all at or near 0,0,0 vector and angles for parented objects because they are displayed at their parent's origin and angles. Using origin from entity will offset the camera too much, you treat it like local origin and angles like Vector(0, 15, 0) or QAngle(15, 0, 0) for example.
Shadowysn  [作者] 10 月 29 日 上午 11:17 
@Wabisuke 4 Dead
No worry, I had to think about the questions for a while as I was busy roped in for half the day to exercise.

You can set the rotation and position of the camera with SetOrigin and SetAngles , but this has to be done after SetParent and SetParentAttachment .

I might not understand the second question exactly, but you could use SetOrigin just by itself for the camera.
Wabisuke 10 月 29 日 上午 10:50 
@Shadowysn I apologize for bothering you during your busy time, but I would appreciate it if you could answer these two questions to let me know only whether it's possible or not.
Wabisuke 10 月 28 日 下午 11:46 
@Shadowysn
Do you know how to change the rotation and positon of a viewmodel camera in VScript?

Is there a way to copy only the position of a camera when attaching it, without copying its rotation? This is because 30 ticks per second is insufficient for the camera's movement.
Wabisuke 10 月 27 日 上午 8:18 
@Shadowysn
Thank you! Your information is really helpful :health:
Shadowysn  [作者] 10 月 27 日 上午 8:16 
local client = Ent(1);
local viewModel = NetProps.GetPropEntity(client, "m_hViewModel");

local armsDyn = SpawnEntityFromTable("prop_dynamic", {
model = "models/weapons/arms/v_arms_bill.mdl",
solid = 0,
origin = client.GetOrigin(),
});

DoEntFire( "!self", "SetParent", "!activator", 0, viewModel, armsDyn );
NetProps.SetPropInt(armsDyn, "m_MoveType", 0);
NetProps.SetPropInt(armsDyn, "m_fEffects", (1 << 0)|(1 << 7)|(1 << 9)); // EF_BONEMERGE|EF_BONEMERGE_FASTCULL|EF_PARENT_ANIMATES
Wabisuke 10 月 27 日 上午 8:10 
@Shadowysn
Could you provide me with a script I can use as a reference?
Shadowysn  [作者] 10 月 27 日 上午 8:07 
@Wabisuke 4 Dead
I did use EF_BONEMERGE most prominently in the Survivor Death Animations script.
And yes, I tested before and you can attach prop models to the predicted_viewmodel entity so you can create fake arms and viewmodels, though the viewmodel FOV will not be respected and the fake viewmodel will clip through geometry. These problems are where I gave up on the fake viewmodel idea, but you could be able to do something with it.
Wabisuke 10 月 27 日 上午 8:01 
@Shadowysn
to recreate the viewmodel using prop_dynamic, what should I do to sync movements of weapon model and viewmodel? Have you ever used EF_BONEMERGE?
Shadowysn  [作者] 10 月 26 日 下午 9:57 
@Wabisuke 4 Dead
Unfortunately not that I know of. The game ties rendering viewmodel to the game client, and the client decides it will only render the viewmodel strictly in first-person view. There's nothing found for VScript to force it to render the viewmodel in third-person.
Wabisuke 10 月 26 日 上午 8:00 
@Shadowysn
Sorry for the unrelated question. Is it impossible for point_viewcontrol or camera related entities to render a viewmodel? I thought you might know a way.
Amonjabraa 8 月 25 日 下午 5:24 
its not working in solo
kanadianborn 8 月 16 日 下午 10:05 
"No VSLib" in mod title

Looks inside:

VSLib.

/\_/\
( o.o )
> ^ <
Brovian 6 月 8 日 上午 2:06 
Awesome mod.Can you creat a script which can fix the thirdperson lasergun upgrade?I can not see the laser after the gun have laser upgrade in third person.
fallfox 4 月 13 日 上午 10:14 
it's good but sometimes i'm hearing the gunshot play twice at once
٨ـﮩﮩミ★ ✪ـﮩ 3 月 10 日 上午 6:31 
not work something
L⊙ω⊙K砖家 3 月 4 日 上午 2:44 
Unfortunately, it cannot be used online
ramikami 3 月 3 日 上午 2:44 
does that mean you could only use it in local server?
Hazel 3 月 2 日 下午 8:41 
@sekine H.U.N.K'S thirdperson
Dr. Congo 3 月 2 日 下午 4:53 
can anyone recommend me a good stable mod to be able to play in third person
Mint19 3 月 2 日 下午 4:26 
Finally dude. Thank you so much!
common_male_rural01.mdl 3 月 2 日 下午 3:21 
was there stink lines in the old code
Pwnage Peanut 3 月 2 日 上午 2:53 
The future is now
Wingo 2 月 28 日 下午 7:30 
OHHH Boy, nice
MisterMayoNL 2 月 28 日 上午 10:07 
Another great mod!
Ⱨ.Ʉ.₦.₭ 2 月 27 日 下午 5:12 
But it works online.
Ⱨ.Ʉ.₦.₭ 2 月 27 日 下午 5:11 
Nice man, this is so much better, I too made or tried to make some kind of fix for the shotgun sounds (mine is more of a trick) It ties the shotgun sounds to the .mdl file so it's not compatible with re-models.
Henrietta 2 月 27 日 下午 2:57 
this is a third-person shotgun sound fix script where horses live
SHΛDOW 2 月 27 日 下午 2:55 
always excited when i see you releasing new add-ons, cause they always in great shape :health:
Shadowysn  [作者] 2 月 27 日 上午 9:48 
@ChimiChamo
i can't believe I forgot the most crucial feature of third-person shotgun fixes - the conflict with vslib
i will make sure to rectify that in the next update
The Law 2 月 27 日 上午 9:45 
Looking forward to it 😉👍🏾
ChimiChamo (decently festive) 2 月 27 日 上午 9:39 
hi this doesnt conflict with vslib can you fix that
Shadowysn  [作者] 2 月 27 日 上午 9:35 
@The Law
Huh. Funny thing to break in the update.
I'll probably look into it and see if I can incorporate this into this mod.
The Law 2 月 27 日 上午 8:55 
Well, I'm a modder myself (mainly making weapons), but last I checked, after the TLS update, shotgun's incendiary sounds don't play animore when you pick them up.

I noticed as my weapons have custom sounds for incendiary, and the shotguns never played them.
Shadowysn  [作者] 2 月 27 日 上午 8:47 
@The Law
First time I'm hearing about shotgun incendiary sounds having issues. What's the problem with it?
The Law 2 月 27 日 上午 8:43 
Awesome! Was missing the third person sounds for a while. All we need fixing now are the shotgun incendiary ammo sounds...
Shadowysn  [作者] 2 月 27 日 上午 8:41 
@Phantom
I didn't find that out until now, seems to have been buried.
Definitely does the same thing more-or-less, but with the exception that it set up a text command for other people to toggle the fix on/off on their end. My version keeps the fix enabled by default since it seemingly didn't affect the sound in first-person other than successfully playing it on third-person.
Never tested other people's perspectives on my version though, so until someone reports issues with it only time will tell whether I keep this listed or not.
LngWard 2 月 27 日 上午 8:31