Re: [hlcoders] Passing sound from player to grenade entity?

2008-10-29 Thread Yorg Kuijs
Hey list, well I think I got the part of checking if it's thrown in the entity now, but I still don't know how to create the entity before hand while still being able to different throws. I tried a rather dumb approach of using a switch that failed horribly, so I was wondering if anyone had

Re: [hlcoders] Passing sound from player to grenade entity?

2008-10-29 Thread Tony Sergi
It's really simple. Modify the throw function that's on the grenade to NOT create the entity, and instead just do everything else that's done after it's created. Then in your attack thing, create the grenade when they press, start the sound, but don't throw it. Make it follow the player. Then

Re: [hlcoders] Passing sound from player to grenade entity?

2008-10-29 Thread Tony Sergi
Oh, and that means modifying all of the functions that 'send the grenade moving' Throw, Lob, whatever. The point is, you take the creation out of those and create them when the pin is pulled instead of when its thrown, tossed, sautéed, put in a blender, or stir fried, or whatever it is you're

Re: [hlcoders] EmitSound not always emitting sound

2008-10-29 Thread Maarten De Meyer
If no-one has any idea why EmitSound can be unreliable, is there another/better way to emit sounds? Anyone here implemented a minigun with alternating, looping sounds being played in sequence? Hi list, *if this is a duplicate mail, ignore it, I'm having mailhost problems* I'm doing sound

Re: [hlcoders] EmitSound not always emitting sound

2008-10-29 Thread Yorg Kuijs
Well EmitSound is unreliable for me when played from the viewmodel of grenades, another dev who helps test said it's because the map I was testing on uses looping ambient_generic sounds and the problem might go away. But from what I read the first time you mailed I didn't think it applies on

Re: [hlcoders] EmitSound not always emitting sound

2008-10-29 Thread Maarten De Meyer
no, it's even on the same spot, it randomly doesn't play. Well EmitSound is unreliable for me when played from the viewmodel of grenades, another dev who helps test said it's because the map I was testing on uses looping ambient_generic sounds and the problem might go away. But from what I

Re: [hlcoders] EmitSound not always emitting sound

2008-10-29 Thread Tony Sergi
Use a sound envelope for that sort of thing, instead of using emitsound. Do everything else you already did for maintaining it's state though. -Tony -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Maarten De Meyer Sent: Wednesday, October 29, 2008

Re: [hlcoders] EmitSound not always emitting sound To: Discussion of Half-Life Programming

2008-10-29 Thread Michael Chang
I wish this thread was paid more attention to. I have the same problem too. We have a sword weapon that emits a swing sound but if the player swings too fast the sound no longer gets emitted. Just want to let OP know... you are not alone :) ~M Well EmitSound is unreliable for me when