Sync Tutorial - Adding Audio
 
Add these audio files to audio folder of your game.
Sound Files .zip
Make a new file in your text editor such as notepad.
DO NOT USE WORD PROSSESSORS.
Save the file as Audio.cs in the behavior folder of your game.
new AudioDescription(Music)
{
volume = 1.0;
isLooping=
true;
is3D =
false;
type = $GuiAudioType;
};

new AudioDescription(Effects)
{
volume = 1.0;
isLooping=
false;
is3D =
false;
type = $GuiAudioType;
};

new AudioProfile(backgroundMusic)
{
filename =
"~/data/audio/SyncMusic.wav";
description =
"Music";
preload =
true;
};

new AudioProfile(Shoot)
{
filename =
"~/data/audio/Shoot.wav";
description =
"Effects";
preload =
true;
};

new AudioProfile(Explosion)
{
filename =
"~/data/audio/ExplosionBig.wav";
description =
"Effects";
preload =
true;
};
Add this code to function PlayerClass::ShootLaser(%this) of the ShipWeapons.cs file:
alxPlay(Shoot);
Add this code to function PlayerClass::Explode(%this) of the ShipMovement.cs file:
alxPlay(Explosion);
Add this code to function function EnemyClassA::Explode(%this) of the EnemyA.cs file:
alxPlay(Explosion);
Congratulation you now have a playable game!!!

This same basic concept can be used in many of your other projects, and can be improved much further.

Improving Sync

Make a menu
Add Power Ups Double Lasers
Make different type of enemies that look out for bullets
Multiplayer support
Add more levels
and much more
Home Page
Previous Page