If you want the music to keep playing continously checked the loop box. Then when you want it to stop add the stop music behavior. Then if you want it to start again from where it was add the play music behavior and go down to resume current music.
This is what you have to do. Have a attribute call it music toggle and have it a interger set to zero. Have a rule when attribute music toggle = 0 change attribute device audio music volume to 10. Then have another rule when attribute music toggle = 1 change attribute device audio music volume to 0.
Then in the music on off button actor have a rule when touch is pressed change attribute music toggle to (music.toggle+1)%2
The expression above is modulos. That is how you switch between 1 and 0. If you have rules when touch is pressed change to 1 and when touch is pressed and it equals one change to zero it doesnt work like that. It will work if you do it like i said
what exactly are you trying to accomplish?? it sounds to me like you have the play music or sound rule added to your actor, and when he dies, you destroy it, which kills the rule. Is that correct?
jonmulcahy said: what exactly are you trying to accomplish?? it sounds to me like you have the play music or sound rule added to your actor, and when he dies, you destroy it, which kills the rule. Is that correct?
what is your final goal?
Thats what ive been trying to figure out lol. He said he want a sound on off button but then he said the sounds stops when he dies so i think he has the sounds in destroying actor like you said, thats why i told him to put the sounds behaviors in the sound button itself.
haha I am so sorry that I only gave 50% lol okay i have the On/Off Button on there already but when I die I the music seams to stop i followed JP's & CookBook & still can't seem to figure it out
how is your play music function setup? where is the rule located? does your on/off button work as you expect? when you say you die, what happens. what sort of rules do you have on your player character? what sort of rules do you have on your playMusic actor (if you have one)?
@Jon Mulcahy I have the On/Off button & Works fine..... no I have the Resume Music on the flag to the next level..... Rule is located on the options menu.... When I die or hit an evil monster I PUT A RULE ON HIM TO RESET SCENCE...... When It Reset Scence the Music Doesn't Play
Comments
do i have to make an actor some where after the music on/off button
Thank U So Much,
Bo
Then in the music on off button actor have a rule when touch is pressed change attribute music toggle to (music.toggle+1)%2
The expression above is modulos. That is how you switch between 1 and 0. If you have rules when touch is pressed change to 1 and when touch is pressed and it equals one change to zero it doesnt work like that. It will work if you do it like i said
I TRIPPLED CHECKED
SMILE):
what is your final goal?
i followed JP's & CookBook & still can't seem to figure it out
Once Again Im SORRY FOR GIVING 50%
no I have the Resume Music on the flag to the next level.....
Rule is located on the options menu....
When I die or hit an evil monster I PUT A RULE ON HIM TO RESET SCENCE......
When It Reset Scence the Music Doesn't Play
Thanks,
Bo