Wav help
Mar 16 2010, 12:29 am
By: Seigekiller  

Mar 16 2010, 12:29 am Seigekiller Post #1



Ok, for my RPg, i need town music. I have the music, but ok say there are 3 towns. How do i make it so if ur in this town it plays this song and in te next it stops the current song and plays the other? No drones to switch music, just by moving ur hero unit to a different area



None.

Mar 16 2010, 1:36 am Lethoth Post #2



Make a location of the towns, and when the player brings the unit you want it will constantly set a switch, and when you leave that town you enter in another location, clear previous switches and set new ones; also remember the music trigger must have the switches as conditions. I give you an example:

Trigger("Player #"){
Conditions:
Bring("Current Player", "Any unit", "TOWN 1", At least, 1);
Switch("Switch1", not set);
Switch("Switch2", not set);
Switch("Switch3", not set);

Actions:
Set Switch("Switch1", set);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player #"){
Conditions:
Bring("Current Player", "Any unit", "TOWN 1", Exactly, 0);

Actions:
Set Switch("Switch1", clear);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player #"){
Conditions:
Bring("Current Player", "Any unit", "TOWN 2", At least, 1);
Switch("Switch1", not set);
Switch("Switch2", not set);
Switch("Switch3", not set);

Actions:
Set Switch("Switch2", set);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player #"){
Conditions:
Bring("Current Player", "Any unit", "TOWN 2", Exactly, 0);

Actions:
Set Switch("Switch2", clear);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player #"){
Conditions:
Bring("Current Player", "Any unit", "TOWN 3, At least, 1);
Switch("Switch1", not set);
Switch("Switch2", not set);
Switch("Switch3", not set);

Actions:
Set Switch("Switch3", set);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player #"){
Conditions:
Bring("Current Player", "Any unit", "TOWN 3", Exactly, 0);

Actions:
Set Switch("Switch3", clear);
Preserve Trigger();
}

//-----------------------------------------------------------------//

And to play the wavs, here is the trigger:

Trigger("Player #"){
Conditions:
Switch("Switch#", set);

Actions:
Play WAV("Your WAV");
Wait(X); Here there are many ways to loop the sound, you can use Wait, a Death counter, Countdown timer, etc. It's your choice.
Preserve Trigger();
}

//-----------------------------------------------------------------//

That's it! I hope this helps. Good luck, if you need more help just reply and I will answer



None.

Mar 16 2010, 1:41 am Vrael Post #3



There is actually no way to order a .wav file to stop playing. The only workaround really is to chop it up into multiple wav files and use a combination of hyper triggers + death count timers to control the smaller segments of it.



None.

Mar 16 2010, 2:18 am Seigekiller Post #4



well you know what.... I don't have that kind of time to learn hyper triggers >.<



None.

Mar 16 2010, 2:23 am Vrael Post #5



http://www.staredit.net/topic/7783/

Read the section "Waits, Wait Blocks, and Hyper Triggers"

And the section "Death Counts"

Should take you all of 15 minutes to read and understand. If you read slowly.



None.

Mar 16 2010, 2:55 am Seigekiller Post #6



ok, ill look at that tomorrow, also the wav's don't play for some reason. i did it exactly as u should :(



None.

Mar 16 2010, 5:18 am NudeRaider Post #7

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Do you have the trigger owned by the player that is supposed to hear it? Because play wav is a Current Player action.
Of course you can have the trigger owned by all human players the same time too.




Mar 16 2010, 10:44 am Seigekiller Post #8



Yes i have it set to force one, i even switched it to individual players now and it still doesn't work



None.

Mar 16 2010, 2:10 pm Lethoth Post #9



Would you mind posting the map? So we can look at that weird trouble you have, thanks.



None.

Mar 16 2010, 7:40 pm Seigekiller Post #10



http://www.mediafire.com/?izytljmeyzn

that is the link to the map



None.

Mar 17 2010, 12:48 am rockz Post #11

ᴄʜᴇᴇsᴇ ɪᴛ!

You're using switches to play music. That's a bad idea, since switches are global. Currently, the triggers which play the wavs are owned by "Daedric Princes", which I assume are not the players.

Use a Death Count instead. Rename the unit "cantina" to "music".

Next, have each set of Wav files associated with a number. For example:
0=no music
1=Leyawiin
2=Cave
3=etc...

For Leyawiin, you've already got the trigger set up, just set deaths of "music" to 1 whenever the player is in the location "Leyawiin". No clearing other music, no nothing.

Whever deaths of "music" is 1, have another death counter count up to the length of the music. For example, rename "cave" with "musictime". I recommend splitting the music into 7 second segments, and always add 1 to "musictime". At "musictime"=0, play "Leyawiin1.wav" for current player. At "musictime"=83, play "Leyawiin2.wav" for current player. At "musictime"=166, play "Leyawiin3.wav" for current player. Repeat until you have no more parts of the original wav.

Note that this will not work on anything other than fastest. If you want it to work on other speeds, use waits instead of "musictime".

Does this make sense?



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Mar 17 2010, 1:00 am Lethoth Post #12



That's a really good idea, rockz, I totally agree with that method.



None.

Mar 17 2010, 1:19 am Seigekiller Post #13



Daedric Princes are the players

and can u give em an example? I'm kinda fuzzy on deaths cuz i never used them b4



None.

Mar 17 2010, 2:19 am mapping4joy Post #14



I think this is what rockz said. Someone correct me if I'm wrong

CONDITIONS
Current Player brings at least 1 Hero to 'Leyawin'
ACTIONS
Modify Death Counts for Current Player: Set to 1 for 'music'.
Preserve Trigger

CONDITIONS
Current Player has suffered at least 1 deaths of 'music'
ACTIONS
Modify Deaths for Current Player: Add 1 for 'musictime'
Preserve Trigger

CONDITIONS
Current Player has suffered at least 1 deaths of 'music'
Current Player has suffered exactly 0 deaths of 'musictime'
ACTIONS
Play Wav 'Leyawin1.wav'
Preserve Trigger

CONDITIONS
Current Player has suffered at least 1 deaths of 'music'
Current Player has suffered exactly 83 deaths of 'musictime'
ACTIONS
Play WAV 'Leyawin2.wav'
Preserve Trigger

CONDITIONS
Current Player has suffered exactly 166 deaths of 'musictime'
Current Player has suffered at least 1 deaths of 'music'
ACTIONS
Play WAV 'Leyawin3.wav'
Preserve Trigger

Keep repeating, add 83 each time.



None.

Mar 17 2010, 3:21 am rockz Post #15

ᴄʜᴇᴇsᴇ ɪᴛ!

http://www.staredit.net/?file=1987
this is the second thing I said.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Mar 17 2010, 10:32 am Seigekiller Post #16



CONDITIONS
Current Player brings at least 1 Hero to 'Leyawin'
ACTIONS
Modify Death Counts for Current Player: Set to 1 for 'music'.
Preserve Trigger

where do you get the music?? You can only put units, any unit, men and buildings for that



None.

Mar 17 2010, 4:12 pm mapping4joy Post #17



As rockz already mentioned, he just renamed cantina to music. You can use any unused unit. If you're using scm draft 2 a good list of these are in the units>neutral>neutral tab. By unused I mean any units that are not involved in any part of your rpg. Like if there is no goliath in your rpg you could use that.

Post has been edited 1 time(s), last time on Mar 17 2010, 4:23 pm by mapping4joy.



None.

Mar 17 2010, 4:17 pm NudeRaider Post #18

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Name an unused unit 'music' and read up on Death Counters in the wiki (as Vreal already recommended).

Also read the whole thread again carefully. I'm pretty sure you overread important information/instructions.




Mar 17 2010, 5:43 pm rockz Post #19

ᴄʜᴇᴇsᴇ ɪᴛ!

Please download that map and copy it to your heart's content.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Mar 17 2010, 6:16 pm Seigekiller Post #20



>.< I don't want to loop the music though.. and cutting the 2min to 4min songs into segments will take forever... I.. I guess i can't have music then.. that will play in towns.. one more thing, my map dl is 9mb, why is that?



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:35 am]
Ultraviolet -- Vrael
Vrael shouted: NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
Gonna put deez sportballs in your mouth
[01:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
[2024-4-30. : 7:43 am]
NudeRaider -- Vrael
Vrael shouted: if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Yeah I'm not a big fan of Westernhagen either, Fanta vier much better! But they didn't drop the lyrics that fit the situation. Farty: Ich bin wieder hier; nobody: in meinem Revier; Me: war nie wirklich weg
[2024-4-29. : 6:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[2024-4-29. : 4:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[2024-4-29. : 12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[2024-4-29. : 11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
Please log in to shout.


Members Online: jun3hong