Newbie Needs HELP!! with Custom Taunt
Posted: Fri Jun 30, 2006 4:58 am
This is my first attempt at scripting anything in mohaa. So, I'm sorry if this question is just incredibly stupid. I want to add custom taunts in multiplayer objective games. I don't have to have the menu...a key bind would be fine. I figured this was the place to come, since jv_map is the creator of the ubersound workaround. I've been to lots of forums and put together a stab at it...Could you help me, PLEASE!
Ultimately, I'd like to create a mod that has the script. I have no problem having all the clients in my clan add the mod with the scripts and put the .wav files in the right place...I realize .wav files can not be part of the pk3 tree. I can't seem to code it right. I thought I'd create a .scr file with this:
main:
//spawn a script to create pointer to custom sound
local.master = spawn ScriptMaster
local.master aliascache snd_taunt1 sound/dialogue/customtaunt/taunt1.wav soundparms 1.2 0.0 1.0 0.0 10000 10000 local streamed subtitle "Good job team!" maps "dm obj"
//spawn dummy entity
local.soundorigin = spawn script_model model "fx/dummy.tik"
local.soundorigin.origin = ( 0 0 0)
local.soundorigin playsound local.master
local.soundorigin notsolid
end
I saved this file as taunt.scr.
Then, put it in a folder, zipped it up, renamed it to a customtaunt.pk3, and put it in the main folder. I tried to test it in the game by typing in the console, exec taunt.scr. I get nothing.
BTW, should I ever get this working, I'd like to figure out how to key bind to the function...first thing is first.
I know this is wrong on so many levels. But, you gotta start somewhere. Can somebody tell me what I need to change...be gentle...NEWBIE.
Ultimately, I'd like to create a mod that has the script. I have no problem having all the clients in my clan add the mod with the scripts and put the .wav files in the right place...I realize .wav files can not be part of the pk3 tree. I can't seem to code it right. I thought I'd create a .scr file with this:
main:
//spawn a script to create pointer to custom sound
local.master = spawn ScriptMaster
local.master aliascache snd_taunt1 sound/dialogue/customtaunt/taunt1.wav soundparms 1.2 0.0 1.0 0.0 10000 10000 local streamed subtitle "Good job team!" maps "dm obj"
//spawn dummy entity
local.soundorigin = spawn script_model model "fx/dummy.tik"
local.soundorigin.origin = ( 0 0 0)
local.soundorigin playsound local.master
local.soundorigin notsolid
end
I saved this file as taunt.scr.
Then, put it in a folder, zipped it up, renamed it to a customtaunt.pk3, and put it in the main folder. I tried to test it in the game by typing in the console, exec taunt.scr. I get nothing.
BTW, should I ever get this working, I'd like to figure out how to key bind to the function...first thing is first.
I know this is wrong on so many levels. But, you gotta start somewhere. Can somebody tell me what I need to change...be gentle...NEWBIE.