- Joined
- Aug 25, 2004
- Messages
- 473
Hi, i have found an old code on wc3sear.ch that allows you to play sound only for one player
--------------
function PlaySoundForPlayer takes player whichPlayer, sound whichSound returns nothing
if ( whichPlayer == GetLocalPlayer() ) then
call PlaySoundBJ( whichSound )
endif
endfunction
---------------
I would like to use it, but realy have no knowledge of JASS what so ever
Correct me if i am wrong, but this code should be added to the 'Trigger Comment'
And to run it i can select GUI function: Trigger - Run Trigger
anyway, the code should be changed. What it should do is:
Time every ... sec of the gametime
Take Integer A from 1 to 10 (:there are 10 players:)
If udg_PlayerForce [array = integer A ] - equels to 1
Play udg_RandomSound [array = random integer from 1 to .... ] for player (integer A)
Plz help
PlayerForce is just an integer variable with 10 arrays
RandomSound is a sound variable with XX arrays
--------------
function PlaySoundForPlayer takes player whichPlayer, sound whichSound returns nothing
if ( whichPlayer == GetLocalPlayer() ) then
call PlaySoundBJ( whichSound )
endif
endfunction
---------------
I would like to use it, but realy have no knowledge of JASS what so ever
Correct me if i am wrong, but this code should be added to the 'Trigger Comment'
And to run it i can select GUI function: Trigger - Run Trigger
anyway, the code should be changed. What it should do is:
Time every ... sec of the gametime
Take Integer A from 1 to 10 (:there are 10 players:)
If udg_PlayerForce [array = integer A ] - equels to 1
Play udg_RandomSound [array = random integer from 1 to .... ] for player (integer A)
Plz help
PlayerForce is just an integer variable with 10 arrays
RandomSound is a sound variable with XX arrays
Last edited: