 |
Here you can find some codesources to show you, how to tune up your game!
Codeexample for GameStudio A5:
Invisible soundsource with "doppler effect" at a fixed position.
Domain: Invisible cicada sitting on a tree or in the meadow
Step 1: Include the following code in your script (yourproject.wdl), add the soundfile and save it.
// ***** start definitions *****
sound cicadavoice_01 = <cicada_01.ogg>; // the soundfile <>
var_nsave cicadavoice_01_handle; // the sound handle
// ***** actions *****
action Cicadanoise
{
my.invisible = on;
my.passable = on;
cicadavoice_01_handle = ent_playloop(my,cicadavoice_01,300);
wait (1);
}
Step 2: Create a box using MED and save it as "cicada.mdl".
Step 3: Using WED: Choose Object/Load Entity and select "cicada.mdl". Move it to the final position in the scenery.
Step 4: Click on it and select properties/behaviour and open the Action-Directory: select "Cicadanoise"
Step 5: Compile it and test it....
You can download the sound here: cicada_01.ogg or as zipped WAV here: cicada_01.zip
Note: Click to GameStudio A5, if you want more informations.
|
 |