Sound on/of ???

Non-platform specific questions.

Sound on/of ???

Postby wsc24 » Sun Feb 03, 2008 6:17 pm

Hallo Leute,
wie kann ich es anstellen, einen Sound per Mausklik auf einen Actor ein und auszuschalten? Der Sound soll im eingeschalteten Zustand immer wiederholt werden. Gibt es ein Tutorial dazu?

Danke für Eure Hilfe

wsc24



Hi Folks,
How can I do so that a sound a mouse click on an Actor and off? The sound should have been pressed state always repeated. Is there a tutorial on this?

Thank you for your help

Wsc24

Wsc24
Submarine Projekt for smartphone ready!
User avatar
wsc24
 
Posts: 51
Joined: Tue Jan 22, 2008 9:18 am
Location: 51deg,23min,38.31sec N // 12deg,00min,15.47sec E
Score: 2 Give a positive score

Re: Sound on/of ???

Postby DST » Sat May 17, 2008 5:57 pm

So there's a way for this that works for anything, not just sound. Just use a case switch to change a variable....and anything can be turned on or off.
Mousebuttondown:
Code: Select all
switch(onoff){
case 0:
PlaySound(etc);
onoff=1;
break;
case 1:
StopSound(etc);
onoff=0;
break;
}
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: Sound on/of ???

Postby 4erv' » Tue Jun 10, 2008 12:08 pm

Hm.... why not stop the sound using :
Code: Select all
stopSound(1);

?
Or it will not work? :mrgreen:
Gold Basketball 2008 - the first basketball game made with game editor.

User avatar
4erv'
 
Posts: 188
Joined: Sat Jul 07, 2007 10:52 am
Location: in Recycle Bin
Score: 10 Give a positive score

Re: Sound on/of ???

Postby DST » Tue Jun 10, 2008 1:38 pm

lol yeah ur right. stopSound starts with a lower case s. dunno why.

And yes 0 is sounds and 1 is music.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: Sound on/of ???

Postby 4erv' » Tue Jun 10, 2008 4:42 pm

Explain me 1 thing: why for are words break? :mrgreen:
Gold Basketball 2008 - the first basketball game made with game editor.

User avatar
4erv'
 
Posts: 188
Joined: Sat Jul 07, 2007 10:52 am
Location: in Recycle Bin
Score: 10 Give a positive score

Re: Sound on/of ???

Postby DST » Tue Jun 10, 2008 5:46 pm

break? what you mean? as in a case switch?

break tells a case switch to stop. It will not continue down the page once it finds a true case.

this is one of the things that makes a switch superior to multiple 'if's.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: Sound on/of ???

Postby 4erv' » Tue Jun 10, 2008 6:25 pm

Oh... and what mean AI?
Something random? :mrgreen:
P.S. sorry for so many questions, i just want to understand all this... :mrgreen:
Gold Basketball 2008 - the first basketball game made with game editor.

User avatar
4erv'
 
Posts: 188
Joined: Sat Jul 07, 2007 10:52 am
Location: in Recycle Bin
Score: 10 Give a positive score

Re: Sound on/of ???

Postby DST » Tue Jun 10, 2008 6:38 pm

Artificial Intelligence.....

It means programming the computer to play against you.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: Sound on/of ???

Postby 4erv' » Wed Jun 11, 2008 9:42 am

Oh..... now i understand... :mrgreen:
Thx thx thx thx thx thx thx thx thx thx thx thx thx thx thx thx ! :D
Gold Basketball 2008 - the first basketball game made with game editor.

User avatar
4erv'
 
Posts: 188
Joined: Sat Jul 07, 2007 10:52 am
Location: in Recycle Bin
Score: 10 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron