Left 4 Dead 2

Left 4 Dead 2

382 次評價
Stable Third-person Shotgun Sound Fix script
   
獎勵
加入最愛
已加入最愛
移除最愛
Game Content: Scripts
檔案大小
發佈於
更新時間
4.282 KB
2 月 27 日 上午 8:06
3 月 3 日 上午 6:41
2 項更新註記 (檢視)

訂閱以下載
Stable Third-person Shotgun Sound Fix script

描述
Another simple script I made way earlier, but decided to leave it unpublished as I thought someone's script would be better.
Years later, turns out that was not the case and VSLib was still used.
Why is it that all these shotgun sound fixes still use a library that conflicts with other versions of itself.
41 則留言
Wabisuke 4 Dead 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 4 Dead 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 4 Dead 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 4 Dead 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 4 Dead 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 4 Dead 10 月 27 日 上午 8:10 
@Shadowysn
Could you provide me with a script I can use as a reference?