Okay I went here and I tried the 2nd one without waits:
http://www.staredit.net/index.php?tutorial=125Trigger |
Players: |
¤ Player 6 |
Conditions: |
¤ Always(); |
Actions: |
¤ SetDeaths(P6, Add, 1, Marine);
|
¤ PreserveTrigger(); |
Trigger |
Players: |
¤ Player 1
|
¤ Player 2
|
¤ Player 3
|
¤ Player 4
|
¤ Player 5 |
Conditions: |
¤ Deaths(P6, AtLeast, 1, Marine); |
Actions: |
¤ SetDeaths(P6, SetTo, 0, Marine);
|
¤ PlayWAV("matrix.mp3");
|
¤ PreserveTrigger(); |
But the music won't play. Do you know what's going on?
Thx.
if the music is looping that means the trigger that plays the wav happens b4 the wav ends over and over again
When you put Play Wav, it doesnt play the wav then do the next action, you need to put a wait in there somewhere.
Either that or do it my way--- Counters or a physical timer
Btw if this post helps can you send me a few minerals?
Elite don't beg for minerals by posting, earn them by entering contests or something.
t0fu, there are other ways to make triggers such as using normal wait times IF they don't interfer with triggers you are using. Also, you can try this:
[ Player 6 ]
Conditions:
Always
Actions:
Wait for X milliseconds
set switch "Play Music"
Preserve Trigger
[ Player 1 ]
Conditions:
"Play Music" is set
Actions:
Play wav XXXX
Clear "Play Music"
Preserve Trigger
If you don't have switches, then use death counters.
n0b0dy- I tried it your way and this is what I have:
Trigger |
Description: |
Music1 |
|
Players: |
¤ Player 6 |
Conditions: |
¤ Always(); |
Actions: |
¤ Wait(26000);
|
¤ SetSwitch(Switch 256, Set);
|
¤ PreserveTrigger();
|
¤ Comment("Music1"); |
Trigger |
Description: |
Music2 |
|
Players: |
¤ Player 1 |
Conditions: |
¤ Switch(Switch 256, Set); |
Actions: |
¤ PlayWAV("matrix.mp3");
|
¤ SetSwitch(Switch 256, Clear);
|
¤ PreserveTrigger();
|
¤ Comment("Music2"); |
In the player 1 section I also have this trigger:
Trigger |
Description: |
ScrollHP |
|
Players: |
¤ Player 1 |
Conditions: |
¤ Always(); |
Actions: |
¤ ModifyUnitHitPoints(All, AnyUnit, All Players, Anywhere, 10);
|
¤ Wait(5);
|
¤ ModifyUnitHitPoints(All, AnyUnit, All Players, Anywhere, 20);
|
¤ Wait(5);
|
¤ ModifyUnitHitPoints(All, AnyUnit, All Players, Anywhere, 40);
|
¤ Wait(5);
|
¤ ModifyUnitHitPoints(All, AnyUnit, All Players, Anywhere, 60);
|
¤ Wait(5);
|
¤ ModifyUnitHitPoints(All, AnyUnit, All Players, Anywhere, 80);
|
¤ Wait(5);
|
¤ ModifyUnitHitPoints(All, AnyUnit, All Players, Anywhere, 100);
|
¤ Wait(5);
|
¤ ModifyUnitHitPoints(All, AnyUnit, All Players, Anywhere, 80);
|
¤ Wait(5);
|
¤ ModifyUnitHitPoints(All, AnyUnit, All Players, Anywhere, 60);
|
¤ Wait(5);
|
¤ ModifyUnitHitPoints(All, AnyUnit, All Players, Anywhere, 40);
|
¤ Wait(5);
|
¤ ModifyUnitHitPoints(All, AnyUnit, All Players, Anywhere, 20);
|
¤ Wait(5);
|
¤ PreserveTrigger();
|
¤ Comment("ScrollHP"); |
But I still can't hear the song! And YES my speakers are on.
Try playing the wav with an always condition to make sure that it actually works.
Wow I'm an idiot -.- I forgot it had to be WAV. Anyways I got the problem but now only Player 1 can hear the music -.-. But when I left the game Player 2 said he could hear it. hm..
y cant u just do this?
Trigger |
Description: |
Music |
|
Players: |
¤ Human Players |
Conditions: |
¤ Player ? brings atleast 1 any unit to location 'Music on' |
Actions: |
¤ Play Wav 'Song 1 12 sec long'
|
¤ wait 12000 seconds
|
¤ preserve trigger
|
¤ Comment Music |
QUOTE(Insane @ Jul 2 2006, 02:29 PM)
y cant u just do this?
Trigger |
Description: |
Music |
|
Players: |
¤ Human Players |
Conditions: |
¤ Player ? brings atleast 1 any unit to location 'Music on' |
Actions: |
¤ Play Wav 'Song 1 12 sec long'
|
¤ wait 12000 seconds
|
¤ preserve trigger
|
¤ Comment Music |
[right][snapback]516745[/snapback][/right]
Because I want the song to go on through the whole game. Not just when a unit goes to a location. =/
First off you didnt read the entire tutorial all the way threw, it says that 11.8 death counters are added in a second, you have to find out how long the song is (in seconds) then divide by 11.8 and that number (nearest whole number rounded up) scince there are no decimals.
That should solve your problem...
PS.
Its not always going to be exact, you will have to experiment with it....
QUOTE(Maith @ Jul 2 2006, 03:08 PM)
First off you didnt read the entire tutorial all the way threw, it says that 11.8 death counters are added in a second, you have to find out how long the song is (in seconds) then divide by 11.8 and that number (nearest whole number rounded up) scince there are no decimals.
That should solve your problem...
PS.
Its not always going to be exact, you will have to experiment with it....
[right][snapback]516760[/snapback][/right]
Oh ya I didn't really get that part I forgot to tell you guys sorry lol. What does it mean?
ok im gunna say this::
Death counters are just another form of switches, just a fyi
~Conditions~
Always
~Actions~
Add 1 Death for Aldaris (High Templar) for P1 (use a unit your not going to be using)
preserve trigger
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~Conditions~
P1 suffered at least * amount of Aldaris (High Templar)
~Action~
Set deaths of Aldaris (High Templar) to 0 for {1
Play (music).wav
Preserve Trigger
I used P1 and Aldaris (high templar) for example
Ok now if your running Fastest for games speed (yes speed matter read the entire tutorial next time) then you will have 11.8 death counters a second...you will have to mess with it a bit to get a whole number, if your running other game speeds, then your gunna have to figure it out your self...
but you should have something in your mission breifing that tells the user to run Fastest for the game speed...just for reccommendation...I hope I helped your problem, if not reread the tutorial a couple more times.
Er...I want to know the music loop using Switches because it's more simpler..
The thing is only Player 1 can hear the music. Then if Player 1 leaves only Player 2 can hear the music. How do you make it so everyone can hear the music??
list it under All Players, and have the Death Counter a player your not using much (or at all)....
Now I don't hear it at all =o.
wow, your map is picky, maybe you could do it for each play.
seprate trigs....
make the death counters the same though (same player) .
put your trigger under all players
use death counters or switches waits are too complicated
if u cant make everyone hear it then....maybe the condition isnt being met and should add some fake worthless actions in there such as add 99999 minerals so u no the condition is met
or perhaps make a bring unit here and the sound plays like insane had suggested
Ookay I got it thank you all for helping me 8].
QUOTE(t0fu @ Jul 2 2006, 04:38 PM)
The thing is only Player 1 can hear the music. Then if Player 1 leaves only Player 2 can hear the music. How do you make it so everyone can hear the music??
[right][snapback]516799[/snapback][/right]
Everyone else is telling you retarded stuff right now.
Player 2 can't hear the music because player 1's music trigger clears the switch before all the other players run their triggers. If player 1 wasn't there then player 2 would hear the music but players 3+ would not.
Going from your switch example the easiest way to fix it is to put a wait 0 above of the 'clear switch' action. What this does is allow the other triggers to be checked and exicuted before continueing that trigger, clearing the switch.