Hi folks, I'm trying to make a generic sound player where you can specify the filepath of the sound to be played in-editor. I'm not sure what's the correct way to go about it.
Looking at quake's default ambient sound players, I was wondering if you could grab the key/value set in the editor. The key being something like "filepath" and the value being a string like "ambient/test.wav".
if this is the right way to go about it, how can I grab the key value assigned in the editor and put it where "X" is in the above code?
Looking at quake's default ambient sound players, I was wondering if you could grab the key/value set in the editor. The key being something like "filepath" and the value being a string like "ambient/test.wav".
Code:
void() soundbox = { precache_sound ("X"); ambientsound (self.origin, "X", 0.5, ATTN_STATIC); };
Comment