Button that plays music wont stop... Created 19 years ago2005-03-28 04:52:43 UTC by Sheadog Sheadog

Created 19 years ago2005-03-28 04:52:43 UTC by Sheadog Sheadog

Posted 19 years ago2005-03-28 04:52:43 UTC Post #99657
I have successfully made a button that plays my own music when I press it. However, when I press the button again the song replays even though I have the OnOut command set to StopSound.
Posted 19 years ago2005-03-28 05:15:37 UTC Post #99664
Have the button 'ToggleSound' if there is such an output instead.
RabidMonkey RabidMonkeymapmapmapfapmap
Posted 19 years ago2005-03-28 10:35:11 UTC Post #99710
Um....unless he wants to turn the sound off and on you wouldn;t use toggle....wait what are you trying to do again? Please ask questions, not make statements.

"However, when I press the button again the song replays even though I have the OnOut command set to StopSound."

...last time I checked thats a statement
Posted 19 years ago2005-03-28 20:29:54 UTC Post #99778
How else can I put it. The off button starts the song over. ~How do I make the same button that starts the music stop it?~
Posted 19 years ago2005-03-29 18:15:37 UTC Post #99956
i think.. think i understand...

The button, instead of stopping the music, will just keep the music going when pressed a second time noly it will start from the start again...

I have no idea how to fix it but i shall rephrase your post into a sentance.

"I have a button that i have set to play my music, i want to set it up so that when it is pressed a second time, it switches off. How do i do this?"
Archie ArchieGoodbye Moonmen
Posted 19 years ago2005-03-29 18:55:55 UTC Post #99971
If you want the sound to start or stop depending on the button presses, you need to toggle it instead of starting and stopping it.
RabidMonkey RabidMonkeymapmapmapfapmap
Posted 19 years ago2005-03-29 23:50:09 UTC Post #100019
I have a button that i have set to play my music, i want to set it up so that when it is pressed a second time, it switches off. How do i do this?
:D
Posted 19 years ago2005-03-30 02:59:21 UTC Post #100030
If you want the sound to start or stop depending on the button presses, you need to toggle it instead of starting and stopping it.
Rabid has provided an answer for you...

Just so you know, toggling is different than starting or stopping. To the game engine, starting is just that - from the beginning;play. Stopping is just that - cease and desist. Toggling is switching from one state to the other - like a light switch toggles the light bulb on or off. If you told a light switch every time I push your button, you light up, then you're never telling it to be off.

It's a selection choice in the outputs -- thanks for listening to the rant.
Posted 19 years ago2005-03-30 05:22:31 UTC Post #100057
How else can I put it. The off button starts the song over. ~How do I make the same button that starts the music stop it?~
make an onpress for the startsound and make it trigger once.
then make another onpress for the stopsound and also make it trigger once.
is this what u meant ?
You must be logged in to post a response.