Page 1 of 1

Sound Doesnt Work

Posted: Tue Jan 09, 2007 1:34 am
by Microman171
I cant get my gun to work. Everything is defined and the sounds are all 16bit mono.

here is my weapon log:

Code: Select all

;*********************************************************
; Weapon.ini
; 
; definitions of all projectiles used in the game
;
; definitions of weapons used by the player
;*********************************************************

;*********************************************************
;
; Projectiles
;
;*********************************************************

;*********************************************************
; 9mm
;*********************************************************
[9mm]
type = projectile
actor = projectile\w_bullet.act
rotation = 0 -90 90
scale = 0.1
gravity = false
bounce = false
speed = 3500
lifetime = 1
boundingbox = 1
explosion = BulletExplosion
actorexplosion = BulletExplosion
showboth = false
attachactor = false
bonelevel = true
damage = 20
altdamage = 10
explosionradius = 128
explosiondamage = 0
decal = 0
movesound = weapon\move2.wav
impactsound = impact\ricochet\1.wav



;*********************************************************
;
; Player Weapons
;
;*********************************************************

;*********************************************************
; p99
;*********************************************************
[p99]
type = weapon
slot = 0
firerate = 0.25
catagory = projectile
projectile = 9mm
attribute = enemy_health
ammunition = 9mm
ammopershot = 1
shotpermagazine = 12
worksunderwater = true
attacksound = weapon\deagle.wav
reloadsound = weapon\generic_reload.wav
emptysound = weapon\click.wav
muzzleflash3rd = MuzzleFlash
;
; 1st person
;
viewactor = Weapon\p99.act
viewfillcolor = 255 255 255
viewambientcolor = 255 255 255
viewrotation = -90 180 -58.8
viewoffset = 2.80 2.10 2.20
viewscale = 0.18
viewlaunchoffset = 0 0 25
viewlaunchbone = Bip01 R Hand
viewanimationspeed = 1
viewarmanim = idle
viewidleanim = idle
viewattackanim = idle
viewaltattackanim = idle
viewhitanim = idle
viewalthitanim = idle
viewwalkanim = idle
muzzleflash = MuzzleFlash1
crosshair = crosshair.bmp
crosshairalpha = a_crosshair.bmp
crosshairfixed = true
allowlitcrosshair = true
crosshairlitcolor = 255 0 0
zoomamount = 2
zoomoverlay = zoomlow.bmp
zoomoverlayalpha = a_zoomlow.bmp
allowzoommove = false
recoilamount = 10
recoildecay = 5
bobamount = 10
viewreloadanim = idle
viewkeyreloadanim = idle
viewattackemptyanim = idle
environmentmapping = false
allmaterial = false
percentmapping = 0
percentmaterial = 0
;
; 3rd person
;
playeractor = weapon\p99.act
playerfillcolor = 128 128 128
playerambientcolor = 128 128 128
playerrotation = -90 180 0
playerscale = 1
playerlaunchoffset = 0 0 25
playerbone = BIP01 R HAND
I can only think that it could be because the gun has NO animations what so ever. Do I need to add an Idle animation to make the gun work? The gun not only doesnt mke sound but also doesnt make and gunshot either.

Posted: Tue Jan 09, 2007 12:27 pm
by Juutis
You need a different animation for each action.
Even if they all are the same animation, you need to export them with different names and use them instead of just one animation.

I remember hearing that RF checks what a weapon is doing (ie. reloading, shooting) based on the animation, or something like that. And thats why you need different animations.

Posted: Tue Jan 09, 2007 12:31 pm
by QuestOfDreams
Do you have some empty lines at the end of your ini file? Otherwise you may get some unexpected behaviour...

Posted: Tue Jan 09, 2007 8:51 pm
by Microman171
I tried the lines but no success. I have now got EVERY animation as said in the weapon.ini but now I take like 8 - 12 shots the it crashes. I have NO idea why as the log says nothing.

Posted: Wed Jan 10, 2007 7:52 am
by Microman171
Now I have added one frame to each of the animations and still no luck :(

Posted: Wed Jan 10, 2007 8:43 am
by steven8
I take like 8 - 12 shots the it crashes
You have a reload animation? I was missing that and it did the same thing. I see a reload sound but not a reload animation. Check other weapons to make sure of the name, but I think you need a reload anim.

Posted: Wed Jan 10, 2007 10:09 am
by Microman171
nah I have all of the animations now. I think the prob is the bullets. If I out them in the hud (I have NO idea hw so I guessed) nd nothing shows up. How do I make it show up even with no bullets??