Left 4 Dead 2
Оценок: 383
Stable Third-person Shotgun Sound Fix script
   
Наградить
В избранное
В избранном
Удалить
Game Content: Scripts
Размер файла
Добавлен
Изменён
4.282 KB
27 фев в 8:06
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 30 окт в 1:01 
@Shadowysn
Thanks for your information. Now I can confidently tackle more complex approaches.
Shadowysn  [создатель] 30 окт в 0: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 29 окт в 11:49 
@Shadowysn I meant to ask whether it would be possible to move the viewmodel camera independently of the arm.
Shadowysn  [создатель] 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  [создатель] 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 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 28 окт в 23: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 27 окт в 8:18 
@Shadowysn
Thank you! Your information is really helpful :health:
Shadowysn  [создатель] 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 27 окт в 8:10 
@Shadowysn
Could you provide me with a script I can use as a reference?