Staredit Network

Staredit Network -> UMS Assistance -> Looking music
Report, edit, etc...Posted by Inuyasha1782 on 2005-03-29 at 17:15:10
I am trying to loop music in my game. I looked at the tutoral about it and did everything it said. But for some reason its still not working. Here is what I have so far:


Trigger
Description:
Looping music
Players:
¤ Player 3
Conditions:
¤ Current player has suffered exactly 0 deaths of Music Switch.
Actions:
¤ Modify death counts for player 3: Set to 1 Music Switch.
¤ Wait for 1 milliseconds
¤ Modify death counts for player 3: Set to 0 for Music Switch.
¤ Wait for 12000 milliseconds.
¤ Preserve Trigger.


That is for the unused player. This is for the human player:

Trigger
Description:
Human Trigger for Looping Music
Players:
¤ Player 1
Conditions:
¤ Player 3 has suffered exactly 1 deaths of Music Switch.
Actions:
¤ Play "Sandstorm clip.wav".
¤ Preserve Trigger.


What happens is the music only plays once in the beggining and will not loop again. Can someone tell me what I did wrong?
Report, edit, etc...Posted by pimpinelephant on 2005-03-29 at 17:48:49
hmm, are u using hyper triggers?
Report, edit, etc...Posted by Inuyasha1782 on 2005-03-29 at 18:09:40
No im not. I have not added any yet. But I plan too later on. I already looked for any other triggers that might effect it but I didn't see anything.
Report, edit, etc...Posted by chuiu on 2005-03-29 at 18:16:10
You must have some other waits running that are getting in the way. What other waits do you have running for player 3?
Report, edit, etc...Posted by Inuyasha1782 on 2005-03-29 at 18:18:40
Thats the only trigger I have for player 3. The main duty for player 3 was just showing units that you can buy, like on the def maps. But since it was just sitting there with a couple units on the map I decided to use it.
Report, edit, etc...Posted by Dr.Shotgun on 2005-03-29 at 20:29:51
This is my perfect-looping system.

Trigger
Description:
Looping music
Players:
¤ Player who hearz
Conditions:
¤ 'musicplaying' is cleared
Actions:
¤ set 'musciplaying'
¤ play 'music.wav' (your music wav)


This causes it to play ur wav, then throw a switch


Trigger
Description:
Looping music 2
Players:
¤ neutral comp with no bloacking actions newhere
Conditions:
¤ 'musicplaying' is set
Actions:
¤ wait for x milliseconds (time of ur wav)
¤ clear 'musicplaying'


this causes the neutral player to wait, as to allow waits and other blocking actions in the human players

this is all based to the paoint that switches are global, while trigs are not

Enjoy!
Report, edit, etc...Posted by Inuyasha1782 on 2005-03-29 at 20:32:32
Thank you that got it right there. Don't know why the other was not working though.
Report, edit, etc...Posted by Tdnfthe1 on 2005-03-29 at 21:45:44
QUOTE(Inuyasha1782 @ Mar 29 2005, 04:15 PM)
I am trying to loop music in my game. I looked at the tutoral about it and did everything it said. But for some reason its still not working. Here is what I have so far:





Trigger
Description:
Looping music
Players:
¤ Player 3
Conditions:
¤ Current player has suffered exactly 0 deaths of Music Switch.
Actions:
¤ Modify death counts for player 3: Set to 1 Music Switch.
¤ Wait for 1 milliseconds
¤ Modify death counts for player 3: Set to 0 for Music Switch.
¤ Wait for 12000 milliseconds.
¤ Preserve Trigger.


That is for the unused player. This is for the human player:




Trigger
Description:
Human Trigger for Looping Music
Players:
¤ Player 1
Conditions:
¤ Player 3 has suffered exactly 1 deaths of Music Switch.
Actions:
¤ Play "Sandstorm clip.wav".
¤ Preserve Trigger.


What happens is the music only plays once in the beggining and will not loop again. Can someone tell me what I did wrong?
[right][snapback]175579[/snapback][/right]

Not trying to be rude, but...

your main problem: You didn't analyze your trigger.
-You didnt reset the switch(condition, a.k.a. Deathcount) so that
the trigg to set music to play again would work.

What you did is a common problem, i dont really like the other way above this post. It's less effecient, you can't use it(as shown) if you don't want music to loop forever. The trigg at the top is better, but since your happy with what you have that's fine, figured i'd just tell you your problem.
Report, edit, etc...Posted by chuiu on 2005-03-29 at 22:21:01
Yes he did.
Report, edit, etc...Posted by (U)Bolt_Head on 2005-03-30 at 00:21:25
Dr-Sh0tgun:
This trigger doesn't work for multiple listeners. The first listener sets the switch before the second checks his trigger.

Inuyasha1782:
your trigger should work just fine. You must of left something out please attach the map i would like to see it.

I would think it isn't a wait block however. If it was the counter would remain at 1 and the music would overlap on top of itself. It is possible for it to be a wait block IFF the blocking wait starts when p3 has 1 deaths. But i find it more likely that you copied the trigger wrong.

Tdnfthe1:
He resets it in the first trigger, the other triggers can fire because of the wait between the set and clear. Its quite ingenious actually.
Report, edit, etc...Posted by Dr.Shotgun on 2005-03-30 at 21:03:25
ugh ur right...

perhapz i should just make multiple switches, only 4 human playerz in my map neway
Report, edit, etc...Posted by (U)Bolt_Head on 2005-03-30 at 23:04:52
No you can do any of these, although multiple switches would work of course.

-Use Death Counter so you can 'clear' it for current player.
-Put a wait 0 infront of the clear music playing action
-Use Inuyasha1782's method in switch form. (theres no reason for his to be a death counter)
Report, edit, etc...Posted by in_a_biskit on 2005-03-31 at 02:18:59
QUOTE((U)Bolt_Head @ Mar 30 2005, 04:21 PM)
Inuyasha1782:
I would think it isn't a wait block however.  If it was the counter would remain at 1 and the music would overlap on top of itself.  It is possible for it to be a wait block IFF the blocking wait starts when p3 has 1 deaths. 
[right][snapback]175952[/snapback][/right]

It's probably nothing at all to do with wait actions, considering that Inuyasha has no other triggers for player3.

I suspect that you've just neglected a little detail, like checking or setting the death counters for the wrong player, or not preserving them.
If your triggers are exactly as you've posted them, I would think that they should work. You don't use the death counter "music switch" anywhere else, do you?
Report, edit, etc...Posted by (U)Bolt_Head on 2005-03-31 at 14:53:17
I said that it a wait block probolly isn't the case. Besides he could have triggers for player 3 in the All Players or Force Sections.
Next Page (1)