Author Topic: Frag Sounds  (Read 2607 times)

Offline Slayer

  • Newbie
  • *
  • Posts: 10
    • View Profile
  • Rated:
Frag Sounds
« on: August 30, 2015, 03:39:21 PM »
Yo. I'm sure this has been done before, but i figured i'd share this tip anyway. It makes a .wav play whenever you score a frag. Doubt this gives any real unfair advantage. I use it just to keep myself from staring up at the message feed every 2 seconds. Kills my eyes.

Aprq2 and r1q2 (probably others as well) have a trigger function built in. Allowing you to have commands execute when the console spits out a certain string. Description from aprq2 readme :
"trigger <cmd> <string>" If string match to print msg from server, trigger execute cmd. Wildcard support.

You can use triggers for all kinds of things. Here is what i use to make a sound play upon getting a frag.

Code: [Select]
alias poop "play hitsound.wav"

trigger poop "*was blasted by* Slayer*"
trigger poop "*was gunned down by* Slayer*"
trigger poop "*was blown away by* Slayer*"
trigger poop "*was machinegunned by* Slayer*"
trigger poop "*was cut in half by* Slayer*"
trigger poop "*was popped by* Slayer*"
trigger poop "*was shredded by* Slayer*"
trigger poop "*ate Slayer*"
trigger poop "*almost dodged Slayer*"
trigger poop "*was melted by Slayer*"
trigger poop "*was railed by Slayer*"
trigger poop "*was disintegrated by Slayer*"
trigger poop "*couldn't hide from Slayer*"
trigger poop "*saw the pretty lights from Slayer*"
trigger poop "*didn't see Slayer*"
trigger poop "*caught Slayer*"

Hitsound.wav is a file i downloaded and placed in quake/baseq2/sound. Any stock Q2 sound may be used, though you will have to find out where the sound you want is stored. Pretty sure "play hitsound.wav" only works because i placed it directly in the sound folder. The other sound paths can be found by typing "precache" followed by "soundlist" in the console (you have to be in a game or it won't list many of them). Hitsound.wav is the quake 3 ding. I got it here. https://tf2dingalings.com/sound/download/256

Here is a kill tracker config of sorts. I have not played with it much because all i wanted was frag-sounds, but there is some cool stuff in here. http://faderjok.tastyspleen.net/achievements_incomplete.cfg
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline XANA

  • Newbie
  • *
  • Posts: 44
    • View Profile
  • Rated:
Re: Frag Sounds
« Reply #1 on: August 30, 2015, 09:49:48 PM »
trigger poop "*was blasted by* Slayer*"

For the record, you don't have to put in "Slayer", you can simply put in "$name$" and your client will detect whatever name you're using and apply it to the script, so you don't need to always use one name in order to make it work properly.

Code: [Select]
trigger poop "*was blasted by* $name$*"
You can also do a similar script to make a sound every time you kill yourself; there are a lot of creative things you can do with the trigger/if commands in Apr. It's a little tedious making these kinds of things, though. Your imagination is limited only by your patience.

Code: [Select]
alias kill1 "play yousuck.wav;centerprint How embarrassing!"

trigger kill1 "*$name$ was in the wrong place*"
trigger kill1 "*$name$ should have used a smaller gun*"
trigger kill1 "*$name$ tried to put the pin back*"
trigger kill1 "*$name$ saw the light*"
trigger kill1 "*$name$ blew*"
trigger kill1 "*$name$ died*"
trigger kill1 "*$name$ tripped on*"
trigger kill1 "*$name$ does a*"
trigger kill1 "*$name$ sank like a rock*"
trigger kill1 "*$name$ was squished*"
trigger kill1 "*$name$ cratered*"
trigger kill1 "*$name$ melted*"
trigger kill1 "*$name$ killed*"
trigger kill1 "*feels $name$*

The stock death messages above will not work in other mods with unique death messages such as WOD or LOX, and need to be edited accordingly to the specific mods in question and kept in an autoexec.cfg in the mod folder.

Keep in mind though; the if/then command below is only available in AprQ2 and not R1Q2. With this, the possibilities of the trigger command can be extended greatly.
 
Code: [Select]
if command
----------------------

if <a> <operator> <b> then <command1> [else <command2>]
 If specified condition is true <command1> is executed, otherwise, <command2>.
   
Possible <operators>:
   
op          case sens.   condition
------------------------------------------
==             yes      values/strings are equal
!=, <>         yes      values/strings are not equal
isin           yes      string <b> contains string <a>
!isin          yes      string <b> does not contain string <a>
isini          no       string <b> contains string <a>
!isini         no       string <b> does not contain string <a>
eq             no       strings are equal
ne             no       strings are not equal
     
For numeric values comparsion operators <, <=, >, >= can also be used

-
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
aka sh1va/near

 

El Box de Shoutamente

Last 10 Shouts:

Costigan_Q2

November 11, 2024, 06:41:06 AM
"Stay cozy folks.

Everything is gonna be fine."

There'll be no excuses for having TDS after January 20th, there'll be no excuses AT ALL!!!
 

|iR|Focalor

November 06, 2024, 03:28:50 AM
 

RailWolf

November 05, 2024, 03:13:44 PM
Nice :)

Tom Servo

November 04, 2024, 05:05:24 PM
The Joe Rogan Experience episode 223 that dropped a couple hours ago with Musk, they're talking about Quake lol.

Costigan_Q2

November 04, 2024, 03:37:55 PM
Stay cozy folks.

Everything is gonna be fine.
 

|iR|Focalor

October 31, 2024, 08:56:37 PM

Costigan_Q2

October 17, 2024, 06:31:53 PM
Not activated your account yet?

Activate it now! join in the fun!

Tom Servo

October 11, 2024, 03:35:36 PM
HAHAHAHAHAHA
 

|iR|Focalor

October 10, 2024, 12:19:41 PM
I don't worship the devil. Jesus is Lord, friend. He died for your sins. He will forgive you if you just ask.
 

rikwad

October 09, 2024, 07:57:21 PM
Sorry, I couldn't resist my inner asshole.

Show 50 latest
Welcome, Guest. Please login or register.
November 22, 2024, 05:47:22 AM

Login with username, password and session length