HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Theme for Picked Player

04-14-2003, 04:04 PM#1
keeperofstormz
How can i play a music theme for a picked player? ive tried "pick every player in playergroup triggering player, and play (theme) for picked player...that seems to play the music for all players...what do i do? heh, and im not a noob at WE...just cant figure this out.
04-14-2003, 05:41 PM#2
DaKaN
using pick every player in player group, you would need to use play song for "picked player"

triggering player is used if that player fires an event. also, when a sound, or "theme" is played, its played for all players, no exceptions. The only way around this is to use JASS and use the GetLocalPlayer() function

example:

if (GetLocalPlayer() == ConvertedPlayer(1) then
actions
endif
04-14-2003, 07:32 PM#3
keeperofstormz
isnt there a getlocalplayer function in umswe3.6?
04-14-2003, 08:31 PM#4
DaKaN
yea probably, but i never use the GUI triggers (now that i think about it...)
04-14-2003, 09:15 PM#5
RodOfNOD
uh I think hes asking how to play sound or music for a particular person and to my knowledge that is impossible. You can play sounds that are 3d however and SIMULATE the surrounding area generating the sound. But other people will hear that sound still.

Sorry If anyone knows the answer to this problem I would love to hear it!

Same problem with the "Select" triggers.... :(

good luck!
04-14-2003, 09:17 PM#6
DaKaN
i know what he is asking, and using the get local player can play a sound only for 1 player, i know because im using it now in version 1.0.4 of my rpg,

also using get local player and the SyncSelections() you can make only player 1 select a certin unit while player 2 can either do nothing or select a different unit
04-14-2003, 09:19 PM#7
DaKaN
Quote:
Originally posted by Dakan
Examples of using local player (im not at my home pc so i cant remember all the function names...):
If (ConvertedPlayer(1) == GetLocalPlayer()) then
play a sound ( sound )
endif

Plays a sound only for player 1

If (ConvertedPlayer(4) == GetLocalPlayer()) then
Force player selection ( unit )
SyncSelections()
endif

Forces only player 4 to select a unit, SyncSelections() must be used after a localplayer selection event to avoid desyncs...

There are many other uses also, its basicly to do client side events, some client side only events will cause desyncs though.

pasted from another topic
04-15-2003, 10:44 PM#8
RodOfNOD
once again OOOOOOOOHHHHHHHH! Dakan you ARE the man. Why have I not seen anyone else talk about this. I have asked many times in the chat but noone else got this!!


Great work and thank you!
04-15-2003, 10:58 PM#9
DaKaN
i have seen other posts about this, im not the one that discovered it, so im not taking credit for learning this... but i cannot recall who i learned this off, so i cant give them the proper credit...