Hi!
I dont know anything about jass, but i changed the sounds in dota 6.49c and the text. Thanks to Durchdringen, who made it possible, that this works!
Now it would be nice, when somen can help me with my problem:
I want that when i type for example "-haha" in the ingame chat, that the sound "haha.mp3" is played! Thats just an example, so i only need the function cause then i can other commands myself!
But if you need the map, here it is: http://rapidshare.com/files/87951997/Do ... v6.49c.w3x
function HahA takes nothing returns nothing
local sound gg_snd_haha
local player p=GetTriggerPlayer()
local string s=GetEventPlayerChatString()
if SubString(s,0,6)=="-haha" then
call PlaySoundBJ(gg_snd_haha)
call TriggerSleepAction(4.)
endif
set s=""
set p=null
endfunction
If you don't make it, wait for other good JAASSer or when I am free to run a few test for the map itself, probably after Chinese New Year. Good luck
initiald wrote:Try this, I haven't test it yet, it may or may not work. You know how to set the other part right? this is not complete yet wihout others parts.
function HahA takes nothing returns nothing
local sound gg_snd_haha
local player p=GetTriggerPlayer()
local string s=GetEventPlayerChatString()
if SubString(s,0,6)=="-haha" then
call PlaySoundBJ(gg_snd_haha)
call TriggerSleepAction(4.)
endif
set s=""
set p=null
endfunction
If you don't make it, wait for other good JAASSer or when I am free to run a few test for the map itself, probably after Chinese New Year. Good luck
No I dont know how to set the other part, because i dont know nothing about jass! So you have to tell me how to do that.^^
Rebell91 wrote:Hi!
I want that when i type for example "-haha" in the ingame chat, that the sound "haha.mp3" is played! Thats just an example, so i only need the function cause then i can other commands myself!
I misundertood your words. lol
You have to wait then, I got to sleep now, when I came back next time I will download your map and run a few test if the function works.
Do you need a password for -haha( so taht only you can activate -haha), or, everybody can type -haha??
If you need a password tell so what you do want it to be...
No, i dont need a pw, cause those sounds should be for everybody! I just need an example function (script) for a sound.
For example when you type -haha in the game the sound haha is played. So when you have succes in the game to run away from 3 other enemies, you type -haha in the chat and the sound haha.mp3 is played! (just an example) =)
Its just for fun!
It was just an example! I meant that i only need the function (or something else^^) wich i have to put in the war3map.j file.
I think i can change myself the function with other sounds and commands. But i dont know how i can make that the sound "xxx.mp3" is played when somebody types "-xxx" in the ingame-chat.
Do u know what i mean? Its complicated to say this in english for me.
Then in sound editor, customize it how you would like it.
Then save the map and open it with MPQ master. Then look at the .j script and copy the 2 or 3 lines where the sound is created.
Paste those in the dota map where the sounds are generated.
Then all you need to be is "Play Sound - <sound>".