Cohsty243 Posted April 29, 2007 Share Posted April 29, 2007 I have a meansOfDeath that I want to play a sound with on the attackers side. How could I do this? Link to comment Share on other sites More sharing options...
razorace Posted April 29, 2007 Share Posted April 29, 2007 Could you explain a little more please? Link to comment Share on other sites More sharing options...
Cohsty243 Posted April 29, 2007 Author Share Posted April 29, 2007 Well Hmm. I basically want to add a headshot.mp3 sound file to play. The Sound File would play in unison with a centered string "HEADSHOT!". This would play for the guy who got the frag, and only if the frag was a headshot. So I was wondering if you could do this without creating a meansOfDeath or MOD by like going by the switch (hitLoc) in g_combat.c? Link to comment Share on other sites More sharing options...
Tinny Posted April 30, 2007 Share Posted April 30, 2007 That is a good question, only way I can think of doing it is by creating an event to send to the client. Interested in doing it that way? Link to comment Share on other sites More sharing options...
razorace Posted April 30, 2007 Share Posted April 30, 2007 mmm, maybe the old q3 reward system would work for this? Link to comment Share on other sites More sharing options...
Cohsty243 Posted April 30, 2007 Author Share Posted April 30, 2007 Good Ideas, I'll try an event first. Link to comment Share on other sites More sharing options...
Tinny Posted April 30, 2007 Share Posted April 30, 2007 Hmm, I would do something like EV_CHEER and have the variable generic1 variable tell what kind of cheer, be it head shot or fast ownage rate. Wait a sec, actually have you seen how the code does it for those when they enter the leading score? Link to comment Share on other sites More sharing options...
Cohsty243 Posted April 30, 2007 Author Share Posted April 30, 2007 Nope. Link to comment Share on other sites More sharing options...
ensiform Posted April 30, 2007 Share Posted April 30, 2007 If he wants it serverside the q3 reward system would not work. Just use G_Sound or G_EntitySound. Link to comment Share on other sites More sharing options...
Tinny Posted April 30, 2007 Share Posted April 30, 2007 Using those will also assume that the client has those sounds right? Link to comment Share on other sites More sharing options...
razorace Posted April 30, 2007 Share Posted April 30, 2007 but it won't explode if the client doesn't have those sounds. Link to comment Share on other sites More sharing options...
Cohsty243 Posted April 30, 2007 Author Share Posted April 30, 2007 Cool, I'll check that out, oh and I'm trying to add spreadfire to other weapons like pistol and it didnt work. I've checked out Enhanced source code, and I have the same code. ( I lol'd at the comment that says spreadfire is stubborn ). It is stubborn! lol. So I kept looking and I found something using flrand(-slop,slop) something like that. Is that how I should do it? Link to comment Share on other sites More sharing options...
razorace Posted April 30, 2007 Share Posted April 30, 2007 Look for the how Mishap alters accuracy for the guns in the WeaponFire() in the OJP Enhanced code. Link to comment Share on other sites More sharing options...
Cohsty243 Posted April 30, 2007 Author Share Posted April 30, 2007 I'll check that out! <3 Link to comment Share on other sites More sharing options...
ensiform Posted May 1, 2007 Share Posted May 1, 2007 The random functions that came with JA are not very random it seems. Link to comment Share on other sites More sharing options...
razorace Posted May 1, 2007 Share Posted May 1, 2007 Wow, you missed the bugs thread by several threads, ensi. Link to comment Share on other sites More sharing options...
ensiform Posted May 1, 2007 Share Posted May 1, 2007 Not so rly... Cool, I'll check that out, oh and I'm trying to add spreadfire to other weapons like pistol and it didnt work. I've checked out Enhanced source code, and I have the same code. ( I lol'd at the comment that says spreadfire is stubborn ). It is stubborn! lol. So I kept looking and I found something using flrand(-slop,slop) something like that. Is that how I should do it? I was letting him know that flrand/irand are not very "random". Link to comment Share on other sites More sharing options...
razorace Posted May 1, 2007 Share Posted May 1, 2007 Oh fine. I guess I can't make fun of you then. Link to comment Share on other sites More sharing options...
Griswald Posted May 2, 2007 Share Posted May 2, 2007 We could always just poke Ensi with sticks, razor? ^^ Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.