Alright, now you need to open the map in MPQ master and in the "war3mapImported" directory (If this does not exist you can create it), add the sound file.
Next, in the .j script under globals, add this:
sound gg_snd_haha1
Then stick this:
set gg_snd_haha1 = CreateSound( "war3mapImported\\haha1.wav", false, false, false, 10, 10, "DefaultEAXON" )
call SetSoundDuration( gg_snd_haha1, 5920 )
call SetSoundChannel( gg_snd_haha1, 0 )
call SetSoundVolume( gg_snd_haha1, 127 )
call SetSoundPitch( gg_snd_haha1, 1.0 )
under function main (There might be something called InitSounds or similar to that; in that case put it there) with the rest of the sound declarations.
dota 6.49c commands in the game
Moderator: Cheaters
-
- Forum Staff
- Posts: 829
- Joined: January 28th, 2007, 8:10 pm
- Title: JASS Programmer
- Location: Canada
-
- Junior Member
- Posts: 28
- Joined: January 29th, 2008, 8:34 am
Re: dota 6.49c commands in the game
I see, but there is missing sth?!
With -haha in the ingame chat the sound doesnt work. There is missing a command for that in the function?!
Sorry for that (stupid) question.
With -haha in the ingame chat the sound doesnt work. There is missing a command for that in the function?!
Sorry for that (stupid) question.
-
- Forum Staff
- Posts: 829
- Joined: January 28th, 2007, 8:10 pm
- Title: JASS Programmer
- Location: Canada
Re: dota 6.49c commands in the game
You need to make a trigger for that which detects when players type "-haha".
Put the trigger name in globals.
Add the function code under englobals.
Add the Init code in function main (or with the other Init code).
Put the trigger name in globals.
Add the function code under englobals.
Add the Init code in function main (or with the other Init code).
-
- Junior Member
- Posts: 28
- Joined: January 29th, 2008, 8:34 am
Re: dota 6.49c commands in the game
can you pls make an example?
Ive said that i dont know anything about Jass, so i cant do anything with the word "trigger" etc.
I think that i know what a trigger is but i dont really know how to make one for that command.
The only thing ive done was putting this function:
set gg_snd_haha1 = CreateSound( "war3mapImported\\haha1.wav", false, false, false, 10, 10, "DefaultEAXON" )
call SetSoundDuration( gg_snd_haha1, 5920 )
call SetSoundChannel( gg_snd_haha1, 0 )
call SetSoundVolume( gg_snd_haha1, 127 )
call SetSoundPitch( gg_snd_haha1, 1.0 )
to the other sound function like killingspree.mp3, firstblood.mp3 and so on.
I also put this : sound gg_snd_haha1 under globals
Sorry but i dont know how to make a trigger, a init code or/and a function code for my wish. thats the reason why im asking you to help me.
so i hope you can give me a simple introduction.
Stefan
Ive said that i dont know anything about Jass, so i cant do anything with the word "trigger" etc.
I think that i know what a trigger is but i dont really know how to make one for that command.
The only thing ive done was putting this function:
set gg_snd_haha1 = CreateSound( "war3mapImported\\haha1.wav", false, false, false, 10, 10, "DefaultEAXON" )
call SetSoundDuration( gg_snd_haha1, 5920 )
call SetSoundChannel( gg_snd_haha1, 0 )
call SetSoundVolume( gg_snd_haha1, 127 )
call SetSoundPitch( gg_snd_haha1, 1.0 )
to the other sound function like killingspree.mp3, firstblood.mp3 and so on.
I also put this : sound gg_snd_haha1 under globals
Sorry but i dont know how to make a trigger, a init code or/and a function code for my wish. thats the reason why im asking you to help me.

Stefan
-
- Forum Staff
- Posts: 829
- Joined: January 28th, 2007, 8:10 pm
- Title: JASS Programmer
- Location: Canada
Re: dota 6.49c commands in the game
In globals add "trigger PlaySoundHaha=CreateTrigger()"
Then under globals with all the functions put:
function PlayHahaSound takes nothing returns nothing
call StartSound(gg_snd_haha1)
endfunction
Then put this under function main
call TriggerRegisterPlayerChatEvent(PlaySoundHaha,Player(0),"-haha",true)
call TriggerRegisterPlayerChatEvent(PlaySoundHaha,Player(1),"-haha",true)
call TriggerRegisterPlayerChatEvent(PlaySoundHaha,Player(2),"-haha",true)
call TriggerRegisterPlayerChatEvent(PlaySoundHaha,Player(3),"-haha",true)
call TriggerRegisterPlayerChatEvent(PlaySoundHaha,Player(4),"-haha",true)
call TriggerRegisterPlayerChatEvent(PlaySoundHaha,Player(5),"-haha",true)
call TriggerRegisterPlayerChatEvent(PlaySoundHaha,Player(6),"-haha",true)
call TriggerRegisterPlayerChatEvent(PlaySoundHaha,Player(7),"-haha",true)
call TriggerRegisterPlayerChatEvent(PlaySoundHaha,Player(8),"-haha",true)
call TriggerRegisterPlayerChatEvent(PlaySoundHaha,Player(9),"-haha",true)
call TriggerRegisterPlayerChatEvent(PlaySoundHaha,Player(10),"-haha",true)
call TriggerRegisterPlayerChatEvent(PlaySoundHaha,Player(11),"-haha",true)
call TriggerAddAction(PlayerSoundHaha,function PlayHahaSound)
Then under globals with all the functions put:
function PlayHahaSound takes nothing returns nothing
call StartSound(gg_snd_haha1)
endfunction
Then put this under function main
call TriggerRegisterPlayerChatEvent(PlaySoundHaha,Player(0),"-haha",true)
call TriggerRegisterPlayerChatEvent(PlaySoundHaha,Player(1),"-haha",true)
call TriggerRegisterPlayerChatEvent(PlaySoundHaha,Player(2),"-haha",true)
call TriggerRegisterPlayerChatEvent(PlaySoundHaha,Player(3),"-haha",true)
call TriggerRegisterPlayerChatEvent(PlaySoundHaha,Player(4),"-haha",true)
call TriggerRegisterPlayerChatEvent(PlaySoundHaha,Player(5),"-haha",true)
call TriggerRegisterPlayerChatEvent(PlaySoundHaha,Player(6),"-haha",true)
call TriggerRegisterPlayerChatEvent(PlaySoundHaha,Player(7),"-haha",true)
call TriggerRegisterPlayerChatEvent(PlaySoundHaha,Player(8),"-haha",true)
call TriggerRegisterPlayerChatEvent(PlaySoundHaha,Player(9),"-haha",true)
call TriggerRegisterPlayerChatEvent(PlaySoundHaha,Player(10),"-haha",true)
call TriggerRegisterPlayerChatEvent(PlaySoundHaha,Player(11),"-haha",true)
call TriggerAddAction(PlayerSoundHaha,function PlayHahaSound)
-
- Junior Member
- Posts: 28
- Joined: January 29th, 2008, 8:34 am
Re: dota 6.49c commands in the game
Thanks ive done everything.
But when i host a game with this map i return back to the menu. I dont know what ive made wrong..
Pls help and throw a look on my war3map.j.
The only thing i changed is the folder ive made before from "war3mapImported" in "lol". But ive changed the path in the war3map.j file. so that cant be the fault.
hope you can make that for me.
ive uploaded the map here:
http://rapidshare.com/files/91885193/Do ... c.w3x.html
But when i host a game with this map i return back to the menu. I dont know what ive made wrong..
Pls help and throw a look on my war3map.j.
The only thing i changed is the folder ive made before from "war3mapImported" in "lol". But ive changed the path in the war3map.j file. so that cant be the fault.
hope you can make that for me.
ive uploaded the map here:
http://rapidshare.com/files/91885193/Do ... c.w3x.html
-
- Forum Staff
- Posts: 829
- Joined: January 28th, 2007, 8:10 pm
- Title: JASS Programmer
- Location: Canada
Re: dota 6.49c commands in the game
Syntax error in j script most likely.
Do a syntax check of the j script and debug any errors.
Do a syntax check of the j script and debug any errors.
-
- Junior Member
- Posts: 28
- Joined: January 29th, 2008, 8:34 am
Re: dota 6.49c commands in the game
Alright thank you!!!
It works now! youre my hero.^^
thank you that you had much patience. =)
Greetz
It works now! youre my hero.^^
thank you that you had much patience. =)
Greetz
-
- Junior Member
- Posts: 28
- Joined: January 29th, 2008, 8:34 am
Re: dota 6.49c commands in the game
Hmm now ive just made more functions for more "music" and the new size is now 5,47 mb! I thought i could reduce the sice with the wc3mapreducer, but this tool didnt work (before it worked.i tested it with other maps)... After optimizing the map it becomes bigger (strange, isnt it?).
Can someone reduce this map for me?
http://rapidshare.com/files/92037941/Do ... c.w3x.html
*EDIT*
Now ive found a solution for the map size, but theres another problem: My friends dont hear the sounds, only i hear them! And when they type for example -haha in the ingamechat they get an fatal error and they are kicked out of the game!
But i dont know why!
*EDIT²*:
Now the others hear the sounds. Didnt change anything.^^ but it works now
but 3 sounds dont work and i dont know why...
Can someone reduce this map for me?
http://rapidshare.com/files/92037941/Do ... c.w3x.html
*EDIT*
Now ive found a solution for the map size, but theres another problem: My friends dont hear the sounds, only i hear them! And when they type for example -haha in the ingamechat they get an fatal error and they are kicked out of the game!
But i dont know why!
*EDIT²*:
Now the others hear the sounds. Didnt change anything.^^ but it works now
but 3 sounds dont work and i dont know why...
-
- Forum Staff
- Posts: 829
- Joined: January 28th, 2007, 8:10 pm
- Title: JASS Programmer
- Location: Canada
Re: dota 6.49c commands in the game
Just do the sounds that don't work the same way you did the ones that do work.
Seems to me like you just need to play around with it a bit.
Seems to me like you just need to play around with it a bit.