So, I'm looking to make a set of keys act as a "soundboard" for a few canned responses I've got audio files for.
Example: Pressing F1 selects and plays file1. The same goes for F2::file2 F3::file3 and so on.
I have created an alias in console in an attempt to recreate this soundboard style: alias "play1" "bind = file1; hldjsf; hldj_playaudio;"
And of course, bound F1 to "play1".
When I press F1, it selects and plays file1. However, upon selecting a second file to play, it plays file1 again, instead of file2. If, after playing the file1 bind, I double-tap F2, it will play file2.
I'm not quite sure what is the cause of this. It seems to be queuing file1 after I've already played it once... Any help?
HLDJ: Soundboard style
Re: HLDJ: Soundboard style
that behaviour is somewhat expected since hldj_playaudio works like a toggle (tap once for on, again for off); you might find it more convenient to use hldj_playaudio_on/off instead. So your alias might look like:
which first stops whatever might be playing, then starts the loaded file. You may need to add a few waits before issuing hldj_playaudio_on but with the latest version of HLDJ it's usually not necessary.
Also, in case you haven't already, be sure to check out the sticky/tutorial in this forum on binding songs to keys.
Code: Select all
alias "play1" "bind = file1; hldjsf; hldj_playaudio_off; hldj_playaudio_on"
Also, in case you haven't already, be sure to check out the sticky/tutorial in this forum on binding songs to keys.
Re: HLDJ: Soundboard style
Bonus points for the quick reply.
Okay, cool. I figured it would involve something like that but I think I kept using the _off command in the wrong places.
I'll try to set it up using that advice and let you know how it works.
Okay, cool. I figured it would involve something like that but I think I kept using the _off command in the wrong places.
I'll try to set it up using that advice and let you know how it works.
Re: HLDJ: Soundboard style
No joy.
Putting the command in that spot doesn't appear to work. It seems like it's stopping the audio I just selected, leaving the current audio as none.
Putting the command in that spot doesn't appear to work. It seems like it's stopping the audio I just selected, leaving the current audio as none.
Re: HLDJ: Soundboard style
Seems I lied, a bit of a wait is necessary (though last time I tested, load times were near instantaneous). If the game uses a pre-Source2007 engine, you'll need to replace "wait 10" with ten actual "wait"s or "hldjw" or however many you find is necessary.
Code: Select all
alias "play1" "bind = file1; hldjsf; wait 10; hldj_playaudio_off; hldj_playaudio_on"
-
- Game DJ
- Posts: 13
- Joined: Fri Feb 12, 2010 8:12 pm
Re: HLDJ: Soundboard style
Actually if your using hldj with a older Source game you can just put into your autoexec.cfgRenegade wrote:Seems I lied, a bit of a wait is necessary (though last time I tested, load times were near instantaneous).If the game uses a pre-Source2007 engine, you'll need to replace "wait 10" with ten actual "wait"s or "hldjw" or however many you find is necessary.Code: Select all
alias "play1" "bind = file1; hldjsf; wait 10; hldj_playaudio_off; hldj_playaudio_on"
Code: Select all
alias "wait 10" "wait; wait; wait; wait; wait; wait; wait; wait; wait; wait"
Re: HLDJ: Soundboard style
To add to that, "hldjw" / "hldj_wait" is aliased to about 70 waits.