• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

MUSIC IN REGIONS - RPG ONLINE

Status
Not open for further replies.
Level 6
Joined
Oct 25, 2018
Messages
108
Hi. I am currently modifying an RPG to adapt it from solitary to online. It happens that it inserts a musical subject in each different region of the map, to acclimate according to the scene of the RPG the music of the game. But when doing it in online mode, I must solve the problem that for example player 1 being in region A, sound the music of that region for all players, being that player 2 is in region B. What I want It is to personalize the sound of the regions so that each player independently listens to the background music of their region, without modifying the sound of the player who is in another zone. How can I do it?
upload_2018-12-2_20-43-58.png
upload_2018-12-2_20-44-13.png
upload_2018-12-2_20-39-14.png
 
Level 13
Joined
May 10, 2009
Messages
868
For that, there's is a cool feature where each player may execute certain functions individually by using the GetLocalPlayer condition. In this case, it won't cause you any trouble.
  • Actions
    • Custom script: if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit()) then
    • Sound - Play Whatever <gen>
    • Custom script: endif
To sum it up, the "actions" within those custom script lines will only take place for the owner of triggering unit.

While we are at it, check this thread out in order to avoid future problems related to desynchronization.
 
Level 6
Joined
Oct 25, 2018
Messages
108
For that, there's is a cool feature where each player may execute certain functions individually by using the GetLocalPlayer condition. In this case, it won't cause you any trouble.
  • Actions
    • Custom script: if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit()) then
    • Sound - Play Whatever <gen>
    • Custom script: endif
To sum it up, the "actions" within those custom script lines will only take place for the owner of triggering unit.

While we are at it, check this thread out in order to avoid future problems related to desynchronization.
Is it possible to send me a link with any map where they implement this function? Sorry, I do not know where to look for the option within the thread to be able to lower the triggers step by step.
 
Level 13
Joined
Oct 12, 2016
Messages
769
You could also just make a region and assign ambiance to it, like music, through the sound editor.
That way whenever you pan over the region with your camera, you hear that music.
 
Status
Not open for further replies.
Top