up and down the music and sound
Lordjawi
Member Posts: 9
Hello good morning to all, could you please help me.
I would like to create a menu where you can raise and lower the music and sound.
the percentages are multiples of 10 (10% minimum / maximum 100%)
example;
music = 60%
Sound = 90%
greetings and thanks for your time
hola buenos dias a todos, podrían ayudarme por favor.
me gustaría hacer un menu en el que pueda subir y bajar la musica y el sonido.
los porcentajes sean multiples de 10 (minimo 10% / máximo 100% )
ejemplo ;
musica = 60%
sonido = 90%
un saludo y gracias por su tiempo
Comments
Ok so for sound your button inside your sound slider will have 10 different horizontal positions. Decide what those positions should be then use a rule that when those positions are matched, change the sound volume accordingly with the change attribute behaviour.
I think some clarification is necessary. Do you want +/- buttons, a slider, or some other means of setting the volume levels?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
thanks for replying,
if I would like +/- buttons or slider,
to create one menu of music and sound
could give me a little tutorial on how to do
Greetings and thanks for your time
Have the "+" button add 10% each time it is pressed.
Have the "-" button minus 10% each time it is pressed.
If + is pressed
If devices.musicvolume < 1
Change attribute devices.musicvolume to device.musicvolume + .1
If - is pressed
If device.musicvolume > .1
Change attribute devices.musicvolume to device.musicvolume - .1
Nice volume slider control tutorial here:
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
thank you very much for the help
I try to have if it works
Thanks for your time.