Joey |
i am rather new to sci, and i wanted to make my first game with it this summer. i used to like agi better, but ive been playing sci games lately and i am falling in love with sci ;) my first question, is how would i play a sound? i have codename iceman, and i tried to look at a script file to see how they did sounds, but it wouldnt let me. it said you cannot edit scripts. but how come you can edit scripts in a game you make? i also tried it with other games and it wouldnt work. i can only edit scripts in the game i am making. so please just tell me how to play sounds on a screen. i will ask any other questions i have when i get there.
thanks.
|
AGI1122 |
The reason you can't edit those other scripts is because they are compiled into their resource files. If you look at the game your making, you will notice the src directory which has all your scripts in it. That right there is why you can only edit your own games and not other games.
You should note that if you where to delete that src directory, you would not be able to edit your game's scripts again.
As for playing sounds, there is some examples in the template game's sources if you look through them. And if I am not mistaken doesn't the tutorial teach you how to use sound?
|
joey not logged in |
i may have missed it. i didnt see it if its there. ill search for it in help.
|
AGI1122 |
I am talking about the tutorial, not the help file.
|
JesseJames |
Since I'm in a good mood I'll point you in the right direction.
The tutorial is available here - http://www.bripro.com/scistudio/tutorial/index.html
For information regarding sound support in SciStudio see the bottom of this page - http://www.bripro.com/scistudio/tutorial/chapter1.html
For information about using sounds in a game see this page - http://www.bripro.com/scistudio/help/scc/class_sound.html
For software to edit music see this site - http://www4.ncsu.edu/~rniyenga/sci/soundbox.html
Sorry that I can't help any further, I haven't got round to finishing the tutorial :)
|
cloudee1 |
;)
(send gTheMusic: prevSignal(0) stop() number(900) // the sound resource # loop(1) // how many times you want it to play play() )
|
Joey |
chris, i looked in the tutorial first, looking for a chapter with a title about sounds or something but i didnt see one so i just searched in help.
everyone else, thank you for the help :)
|
Joey |
hmmm, this is my code
(send gTheMusic: prevSignal(0) stop() number(scriptNumber) loop(-1) play() )
i didnt realize it was in the sci studio room1 script thing. anyway, if i leave it like that, it plays the lsl score song over and over (because i have it loop(-1) which is what i want), but i cant change it and put a song i want it. i extracted a resource from code name iceman into my game, added it as sound004 then for number i put 004, and its not playing. how come? how can i get the song i want to play?
|
cloudee1 |
1. you said you saved it as sound004 I assume that also means that you saved it as number 004 as well.
2. use soundbox to make sure that the sound file is set up for the internal speaker.
3. change configuration file to support your soundcard
4. you said before that the code used to work, make sure you didn't misplace anything while changing stuff.
5. play using vdmsound just to be sure the sounds aren't working
In that order.
|