Newbie Needs HELP!! with Custom Taunt

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
netdawg
Private
Posts: 6
Joined: Fri Jun 30, 2006 4:39 am

Newbie Needs HELP!! with Custom Taunt

Post by netdawg »

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.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Hi netdawg and welcome to .Map :)

Unfortunately, what you're trying to do is not so easy.. in fact it's near impossible. You need clients to send some sort of a command to the server, which is one of the hardest things in mohaa scripting as it was never designed for that. There are work-arounds via state files or a morse system but these are major headaches even for experienced scripters :(
Image
Ophisâ„¢
Colonel
Posts: 461
Joined: Sun Mar 12, 2006 2:30 pm
Location: England, Manchester
Contact:

Post by Ophisâ„¢ »

I wouldn't have thought it was that hard. . . cant he just make a custom pk3 with the sounds he wants as the custom taunts and just name them the same as the taunts in the game.. therefore they would be loaded and used instead? then he just packs his pk3 and sends it round to the clients. So its client sided only?!
Image[ Formerly Known As Snakeâ„¢ ]
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Yah that would be an option... not in a pk3 though the taunt sounds are unpacked in the sound folder.. so each user would have to mess with their files :/
Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

he wants new taunts in addition to old ones, i believe.

actually i know that saying a taunt through menu is just a shortcut for typing asterik then two numbers (corrosponding to the menu numbers)

so since the event sends to the server could you perhaps makes a *78 or something? is there a redirect file for the taunts on the server?

just seems like hardcoding it wouldn't have been practical.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
netdawg
Private
Posts: 6
Joined: Fri Jun 30, 2006 4:39 am

Thanks!!!

Post by netdawg »

I can't tell you how relieved I am to see so many thoughts on my little project. Ultimately, it would be great if I could have the custom taunts in addition to the stock ones....but if it's an act of God to get that...it's not worth it. In the many forums and tutorials, I've read on sound...I thought all I'd need to do would be to spawn a dummy entity, a pointer to the wav file, and have the dummy entity play the sound. Those around the position (which I would just make the origin of the map) would hear the sound others might not. I found the aliascache section in the uberdialogue so I know where the pointer to the stock taunts are...and it's easy enough to write some sort of batch file to rename the stock taunts wav files and replace with my custom taunt wavs on every client in the clan. Since I know where the aliascache is, I can even change the subtitle...Unfortunately, I can't change the menu to select the sound and the list of aliascache is in the pak0.pk3 which is a big file to have to download...but it's do able. The cool part about this solution is that if the player doesn't have my custom taunt loaded, he'll get the stock taunt rather than an error message.

I guess I'm whimpin out here...but maybe it's better that my first scripting project be something simple...

Thanks so much for your thoughts. If anyone knows a way to do it with a separate pk3 and additional wav files in a specific folder...I'd love to have that solution, but otherwise, I'll pursue overwriting the stock taunts.

thanks again.
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

the problem isnt getting a sound to play, it's allowing the player to make it happen. i guess it might be impossible without changing the game itself.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Lizardkid, it is impractical, but it is hardcoded. :|

Actually, new taunts could be made by a cooperating intercept dll and a script. You'll still need to distribute the files if you want to use non-stock sounds.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Post Reply