Raised This Month: $51 Target: $400
 12% 

Help me Gonden AK


Post New Thread Reply   
 
Thread Tools Display Modes
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 05-13-2014 , 20:24   Re: Help me Gonden AK
Reply With Quote #11

Quote:
Originally Posted by Backstabnoob View Post
I never tried but why is it impossible to play a different sound over the default one? Two sounds of the same channel cannot be played at the same time, the latter one should always overlap it.
Quote:
Originally Posted by Fr33m@n View Post
Ham primary attack post with good check and maybe you can overwrite sound on the same channel.
I did that with CurWeapon event a long time ago, it worked but badly, and sometimes CurWeapon fail.
Impossible to play a different sound, it is handled by the client, have you ever heard about client prediction? Please search a little bit more about it.
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
Backstabnoob
Veteran Member
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 05-13-2014 , 20:27   Re: Help me Gonden AK
Reply With Quote #12

I have no idea what client prediction means but I know I've seen code snippets where a different sound is sent by the server in the same channel as the weapon sound with a little delay and it works, a bit glitchy but it works. I think Black Rose posted the code.
__________________
Currently busy working on a very large scale anime database project.
Backstabnoob is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 05-13-2014 , 20:32   Re: Help me Gonden AK
Reply With Quote #13

Quote:
Originally Posted by Backstabnoob View Post
I have no idea what client prediction means but I know I've seen code snippets where a different sound is sent by the server in the same channel as the weapon sound with a little delay and it works, a bit glitchy but it works. I think Black Rose posted the code.
https://forums.alliedmods.net/showpo...0&postcount=12

Again, it's handled by the client... there's no sound emition on the decompiled files of CS (also on HL), now you got it? lol
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
Backstabnoob
Veteran Member
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 05-14-2014 , 05:06   Re: Help me Gonden AK
Reply With Quote #14

My bad, the code Black Rose posted was blocking weapon shooting and simulating it with a new sound.
__________________
Currently busy working on a very large scale anime database project.
Backstabnoob is offline
Old 05-14-2014, 06:34
Fr33m@n
This message has been deleted by Fr33m@n.
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 05-15-2014 , 05:42   Re: Help me Gonden AK
Reply With Quote #15

Main thing is that, it was possible, before 2013 update, to play a sound after the current weapon sound using thing like emit_sound(id, CHAN_WEAPON... in CurWeapon event or PrimaryAttack. emit_sound was played over and silenced normal sound.

I tried 2 or 3 years ago with some alliedmodders members that can approve what i say. (Jelle, The art of war, kanatzu...)

I was using CurWeapon. It worked badly. sometimes it failed, due to the fact that CurWeapon is 0.1 late compared to PrimaryAttack, and also CurWeapon fail. But it worked. again some people can approve that.

Main thing is that since the 2013 update, this workaround no longer work at all. I tried today, and i can approve it. They probably modified something in weapon that block this workaround. now the sound is played after the normal sound (chan_weapon ofc) or is not played at all.

With that way, the best you can do is playing 2 sound at the same time.

Another way of modifying weapon sound was to decompile a model, change the sound pathway to a custom pathway in the .qc file. recompile the model and it worked.

Now i can't tell if this still working...

Last edited by Fr33m@n; 05-15-2014 at 05:45.
Fr33m@n is offline
Backstabnoob
Veteran Member
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 05-15-2014 , 13:41   Re: Help me Gonden AK
Reply With Quote #16

It should be working if that's how the default sounds work. IIRC when I decompiled the model of a unmodified CS weapon, the sounds were linked there.
__________________
Currently busy working on a very large scale anime database project.
Backstabnoob is offline
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 05-15-2014 , 14:34   Re: Help me Gonden AK
Reply With Quote #17

mmm. i decompiled a models, and no, shooting by default seems to not be handled in the model, unlike reloading sounds and other non shooting related sound.

v_ak47.qc

PHP Code:
/*
==============================================================================

QC script generated by Half-Life MDL Decompiler 1.2 
2003, Kratisto. Based on code from Valve's HL SDK.

v_ak47.mdl

Original internal name:
"v_ak47.mdl"

==============================================================================
*/

$modelname "v_ak47.mdl"
$cd ".\"
$cdtexture ".\"
$scale 1.0
$cliptotextures


$bbox 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$cbox 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$eyeposition 0.000000 0.000000 0.000000


//reference mesh(es)
$body "rhand" "rhand"

$body "lhand" "lhand"

$body "weapon" "f_ak47_template"


// 2 attachment(s)
$attachment 0 "Bone 04" 2.750000 -22.500000 2.900000
$attachment 1 "Bone52" 0.000000 -3.000000 0.000000

// 4 hit box(es)
$hbox 0 "Bone04" -1.980000 -8.880000 -1.020000 1.730000 0.030000 1.090000
$hbox 0 "Bone_Righthand" -1.340000 -2.980000 -0.410000 1.430000 0.000000 0.630000
$hbox 0 "Bone01" -1.720000 -8.900000 -1.020000 1.990000 0.020000 1.090000
$hbox 0 "Bone_Lefthand" -1.520000 -3.073735 -0.410000 1.250000 0.000000 0.630000

// 6 animation sequence(s)
$sequence "idle1" "idle1" fps 30 
$sequence "reload" "reload" fps 37 { event 5004 13 "weapons/ak47_clipout.wav" } { event 5004 57 "weapons/ak47_clipin.wav" } 
$sequence "draw" "draw" fps 30 { event 5004 11 "weapons/ak47_boltpull.wav" } 
$sequence "shoot1" "shoot1" fps 20 { event 5001 0 "22" } 
$sequence "shoot2" "shoot2" fps 20 { event 5001 0 "22" } 
$sequence "shoot3" "shoot3" fps 20 { event 5001 0 "22" } 

// End of QC script. 
I think they used a workaround rather than a real way :
PHP Code:
v_ak47.mdl

Original internal name
:
"v_ak47.mdl"

==============================================================================
*/

$modelname "v_ak47.mdl"
$cd ".\"
$cdtexture ".\"
$scale 1.0
$cliptotextures


$bbox 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$cbox 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$eyeposition 0.000000 0.000000 0.000000


//reference mesh(es)
$body "rhand" "rhand"

$body "lhand" "lhand"

$body "weapon" "f_ak47_template"


// 2 attachment(s)
$attachment 0 "Bone 04" 2.750000 -22.500000 2.900000
$attachment 1 "Bone52" 0.000000 -3.000000 0.000000

// 4 hit box(es)
$hbox 0 "Bone04" -1.980000 -8.880000 -1.020000 1.730000 0.030000 1.090000
$hbox 0 "Bone_Righthand" -1.340000 -2.980000 -0.410000 1.430000 0.000000 0.630000
$hbox 0 "Bone01" -1.720000 -8.900000 -1.020000 1.990000 0.020000 1.090000
$hbox 0 "Bone_Lefthand" -1.520000 -3.073735 -0.410000 1.250000 0.000000 0.630000

// 6 animation sequence(s)
$sequence "idle1" "idle1" fps 30
$sequence "reload" "reload" fps 37 { event 5004 13 "weapons/ak47_clipout.wav" } { event 5004 57 "weapons/ak47_clipin.wav" }
$sequence "draw" "draw" fps 30 { event 5004 11 "weapons/ak47_boltpull.wav" }
$sequence "shoot1" "shoot1" fps 20 {
    { event 5001 0 "
22" }
    { event 5004 0 "
weapons/awp1.wav" }
}
$sequence "shoot2" "shoot2" fps 20 {
    { event 5001 0 "
22" }
    { event 5004 0 "
weapons/awp1.wav" }
}
$sequence "shoot3" "shoot3" fps 20 {
    { event 5001 0 "
22" }
    { event 5004 0 "
weapons/awp1.wav" }
}

// End of QC script. 
or with this one
{ event 5004 1 "weapons/awp1.wav" }
(1 frame after)

This one play both sound at the same time. Maybe it used to work, like the CurWeapon way.
I Think it's not possible anymore to pass any sound over CHAN_WEAPON if it's in use client side.

The only way now is complete recode of the weapon. but we only have a partial code of weapon so it will never be as the same as valve weapon.
Fr33m@n is offline
Backstabnoob
Veteran Member
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 05-15-2014 , 15:13   Re: Help me Gonden AK
Reply With Quote #18

What is "22"? Maybe it's some kind of a pointer? Can you try changing it to an actual sound file?
__________________
Currently busy working on a very large scale anime database project.
Backstabnoob is offline
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 05-15-2014 , 15:15   Re: Help me Gonden AK
Reply With Quote #19

event 5001 is related to muzzleflash, you know that sprite when you shoot.
Fr33m@n is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 05-15-2014 , 16:45   Re: Help me Gonden AK
Reply With Quote #20

Quote:
Originally Posted by meTaLiCroSS View Post
https://forums.alliedmods.net/showpo...0&postcount=12

Again, it's handled by the client... there's no sound emition on the decompiled files of CS (also on HL), now you got it? lol
ive created weapon system that only weapon_knife is used and i have like 20+ weapons.
Ofcourse for this: https://forums.alliedmods.net/showthread.php?t=175632
I needed to use ohter weapons as well to send fake information for client.
.Dare Devil. is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:20.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode