using sounds in a weapon tiki
Posted: Sat Jun 07, 2008 3:18 am
Hello all.
My weapon is a pistol in place of the kar98. I am wondering how to make it so that there is a seperate sound for each rechamber and for the full reload.
I want a certain sound for after each bullet is fired.. and a seperate sound for when the clip is reloaded at the end of a clip.
Right now I have it set so that a sound is produced after each bullet, and for each reload, but they are the same sound. I tried to put different parts of the kar98 tiki into the new kar98 tiki with the silenced pistol info.. but it crashed the game. Here is the tiki for my weap. up until the view kick controls
TIKI
setup
{
scale 0.60 // Set default scale to 16/30.5 since world is in 16 units per foot and model is in cm's
path models/weapons/highstandard
skelmodel hs_pistol.skd
surface pistol1 shader hi_standard
surface pistol2 shader hi_standard
surface clip shader hi_standard
}
$define sounddir sound/weapons
init
{
server
{
// surface tag* +nodraw
// surface origin +nodraw
classname Weapon
weapontype rifle
name "Mauser KAR 98K"
rank 130 130
pickupsound kar98_snd_pickup
ammopickupsound kar98_snd_pickup_ammo
noammosound kar98_snd_noammo
// Holstering info
// holstertag "Bip01 Pelvis"
// holsteroffset "1.5 -4 -10.0"
// holsterangles "5 190 195"
// holsterScale 1.0
// Primary fire type info
firetype bullet
ammotype "rifle"
meansofdeath bullet
semiauto
bulletcount 1
clipsize 5
startammo 5
ammorequired 1
firedelay 1.45
firedelay 1.2
bulletrange 4000
bulletdamage 75 // was 55 before getting beefed up by z
bulletspread 8 8 65 65 //original 5 5 150 150, was 25 25 150 150 before getting beef up by z
movementspeed 1.0
tracerfrequency 1
crosshair 1
quiet // don't notify AI of it being fired
secondary firetype melee
secondary ammotype none
secondary meansofdeath bash
secondary ammorequired 0
secondary bulletrange 64
secondary bulletdamage 35
secondary bulletknockback 50
secondary quiet
// AI animation group info
weapongroup rifle
// DM Attributes
dmbulletcount 1
dmstartammo 200
dmammorequired 1
dmfiredelay 1.45
dmfiredelay 1.1
dmbulletrange 4000
dmbulletdamage 90
dmbulletspread 2 2 65 65 //original 5 5 150 150
dmcrosshair 1
dmmovementspeed 0.94
// Secondary fire DM Attributes
secondary dmammorequired 0
secondary dmbulletrange 96
secondary dmbulletdamage 30
// this is attached to the player during reload
cache models/ammo/silencedpistol_clip.tik
}
client
{
cache tracer.spr
cache muzsprite.spr
cache models/ammo/pistolshell.tik
}
}
animations
{
idle hs_pistol.skc
reload hs_pistol.skc
{
server
{
18 surface clip +nodraw
39 surface clip -nodraw
last idle
}
client
{
entry sound kar98_snd_reload item
}
}
secondaryfire hs_pistol.skc
{
server
{
entry shoot secondary
}
}
fire hs_pistol_fire.skc
{
server
{
entry shoot primary
}
client
{
entry stopaliaschannel kar98_snd_fire1
entry sound kar98_snd_fire1
I've tried adding and subtracting multiple parts.. but I need some guiadance.
Thanks to anyone who can help me out. Just post the new tiki in the forum and i'll give it a shot
MOHAATiger
My weapon is a pistol in place of the kar98. I am wondering how to make it so that there is a seperate sound for each rechamber and for the full reload.
I want a certain sound for after each bullet is fired.. and a seperate sound for when the clip is reloaded at the end of a clip.
Right now I have it set so that a sound is produced after each bullet, and for each reload, but they are the same sound. I tried to put different parts of the kar98 tiki into the new kar98 tiki with the silenced pistol info.. but it crashed the game. Here is the tiki for my weap. up until the view kick controls
TIKI
setup
{
scale 0.60 // Set default scale to 16/30.5 since world is in 16 units per foot and model is in cm's
path models/weapons/highstandard
skelmodel hs_pistol.skd
surface pistol1 shader hi_standard
surface pistol2 shader hi_standard
surface clip shader hi_standard
}
$define sounddir sound/weapons
init
{
server
{
// surface tag* +nodraw
// surface origin +nodraw
classname Weapon
weapontype rifle
name "Mauser KAR 98K"
rank 130 130
pickupsound kar98_snd_pickup
ammopickupsound kar98_snd_pickup_ammo
noammosound kar98_snd_noammo
// Holstering info
// holstertag "Bip01 Pelvis"
// holsteroffset "1.5 -4 -10.0"
// holsterangles "5 190 195"
// holsterScale 1.0
// Primary fire type info
firetype bullet
ammotype "rifle"
meansofdeath bullet
semiauto
bulletcount 1
clipsize 5
startammo 5
ammorequired 1
firedelay 1.45
firedelay 1.2
bulletrange 4000
bulletdamage 75 // was 55 before getting beefed up by z
bulletspread 8 8 65 65 //original 5 5 150 150, was 25 25 150 150 before getting beef up by z
movementspeed 1.0
tracerfrequency 1
crosshair 1
quiet // don't notify AI of it being fired
secondary firetype melee
secondary ammotype none
secondary meansofdeath bash
secondary ammorequired 0
secondary bulletrange 64
secondary bulletdamage 35
secondary bulletknockback 50
secondary quiet
// AI animation group info
weapongroup rifle
// DM Attributes
dmbulletcount 1
dmstartammo 200
dmammorequired 1
dmfiredelay 1.45
dmfiredelay 1.1
dmbulletrange 4000
dmbulletdamage 90
dmbulletspread 2 2 65 65 //original 5 5 150 150
dmcrosshair 1
dmmovementspeed 0.94
// Secondary fire DM Attributes
secondary dmammorequired 0
secondary dmbulletrange 96
secondary dmbulletdamage 30
// this is attached to the player during reload
cache models/ammo/silencedpistol_clip.tik
}
client
{
cache tracer.spr
cache muzsprite.spr
cache models/ammo/pistolshell.tik
}
}
animations
{
idle hs_pistol.skc
reload hs_pistol.skc
{
server
{
18 surface clip +nodraw
39 surface clip -nodraw
last idle
}
client
{
entry sound kar98_snd_reload item
}
}
secondaryfire hs_pistol.skc
{
server
{
entry shoot secondary
}
}
fire hs_pistol_fire.skc
{
server
{
entry shoot primary
}
client
{
entry stopaliaschannel kar98_snd_fire1
entry sound kar98_snd_fire1
I've tried adding and subtracting multiple parts.. but I need some guiadance.
Thanks to anyone who can help me out. Just post the new tiki in the forum and i'll give it a shot
MOHAATiger