Multiple Sounds

version 3 by Massimo Stella

  • Home page
  • Beginning
  • Previous



  • Section - Declaring Commands

    [Creation Commands]

    To create the midground channel:
    (- ThirdCreate(GG_THIRDCHAN_ROCK); -)

    To create the midground 0 channel:
    (- ThirdCreate(GG_THIRDCHAN_ROCK); -)

    To create the midground 1 channel:
    (- FourthCreate(GG_FOURTHCHAN_ROCK); -)

    To create the midground 2 channel:
    (- FifthCreate(GG_FIFTHCHAN_ROCK); -)

    To create the midground 3 channel:
    (- SixthCreate(GG_SIXTHCHAN_ROCK); -)

    [Add your own 'Create' declarations for any new channels you want to add to your game here.]

    [Playing Commands]

    To play (SND - a sound name) in foreground:
    (- SoundReproduce(ResourceIDsOfSounds-->{SND},gg_foregroundchan,1); -)

    To play (SND - a sound name) in background:
    (- SoundReproduce(ResourceIDsOfSounds-->{SND},gg_backgroundchan,1); -)

    To play (SND - a sound name) in midground:
    (- SoundReproduce(ResourceIDsOfSounds-->{SND},gg_thirdchan,1); -)

    To play (SND - a sound name) in midground 0:
    (- SoundReproduce(ResourceIDsOfSounds-->{SND},gg_thirdchan,1); -)

    To play (SND - a sound name) in midground 1:
    (- SoundReproduce(ResourceIDsOfSounds-->{SND}, gg_fourthchan,1); -)

    To play (SND - a sound name) in midground 2:
    (- SoundReproduce(ResourceIDsOfSounds-->{SND}, gg_fifthchan,1); -)

    To play (SND - a sound name) in midground 3:
    (- SoundReproduce(ResourceIDsOfSounds-->{SND}, gg_sixthchan,1); -)

    [Loop Commands]

    To play (SND - a sound name) in foreground with loop:
    (- SoundReproduce(ResourceIDsOfSounds-->{SND},gg_foregroundchan,-1); -)

    To play (SND - a sound name) in foreground for (loop - a number) times:
    (- SoundReproduce(ResourceIDsOfSounds-->{SND},gg_foregroundchan,{loop}); -)

    To play (SND - a sound name) in background with loop:
    (- SoundReproduce(ResourceIDsOfSounds-->{SND},gg_backgroundchan,-1); -)

    To play (SND - a sound name) in background for (loop - a number) times:
    (- SoundReproduce(ResourceIDsOfSounds-->{SND},gg_backgroundchan,{loop}); -)

    To play (SND - a sound name) in midground with loop:
    (- SoundReproduce(ResourceIDsOfSounds-->{SND},gg_thirdchan,-1); -)

    To play (SND - a sound name) in midground for (loop - a number) times:
    (- SoundReproduce(ResourceIDsOfSounds-->{SND},gg_thirdchan,{loop}); -)

    To play (SND - a sound name) in midground 0 with loop:
    (- SoundReproduce(ResourceIDsOfSounds-->{SND},gg_thirdchan,-1); -)

    To play (SND - a sound name) in midground 0 for (loop - a number) times:
    (- SoundReproduce(ResourceIDsOfSounds-->{SND},gg_thirdchan,{loop}); -)

    To play (SND - a sound name) in midground 1 with loop:
    (- SoundReproduce(ResourceIDsOfSounds-->{SND},gg_fourthchan,-1); -)

    To play (SND - a sound name) in midground 1 for (loop - a number) times:
    (- SoundReproduce(ResourceIDsOfSounds-->{SND},gg_fourthchan,{loop}); -)

    To play (SND - a sound name) in midground 2 with loop:
    (- SoundReproduce(ResourceIDsOfSounds-->{SND},gg_fifthchan,-1); -)

    To play (SND - a sound name) in midground 2 for (loop - a number) times:
    (- SoundReproduce(ResourceIDsOfSounds-->{SND},gg_fifthchan,{loop}); -)

    To play (SND - a sound name) in midground 3 with loop:
    (- SoundReproduce(ResourceIDsOfSounds-->{SND},gg_sixthchan,-1); -)

    To play (SND - a sound name) in midground 3 for (loop - a number) times:
    (- SoundReproduce(ResourceIDsOfSounds-->{SND},gg_sixthchan,{loop}); -)

    [Volume Commands - The argument has to be a value between 0 and 5]

    To set the foreground volume to (VOL - a number):
    (- VolumeControl(gg_foregroundchan,{VOL}); -)

    To set the background volume to (VOL - a number):
    (- VolumeControl(gg_backgroundchan,{VOL}); -)

    To set the midground volume to (VOL - a number):
    (- VolumeControl(gg_thirdchan,{VOL}); -)

    To set the midground 0 volume to (VOL - a number):
    (- VolumeControl(gg_thirdchan,{VOL}); -)

    To set the midground 1 volume to (VOL - a number):
    (- VolumeControl(gg_fourthchan,{VOL}); -)

    To set the midground 2 volume to (VOL - a number):
    (- VolumeControl(gg_fifthchan,{VOL}); -)

    To set the midground 3 volume to (VOL - a number):
    (- VolumeControl(gg_sixthchan,{VOL}); -)

    [RawVolume Commands - The argument has to be a value between 0 and 65536]

    To set the raw foreground volume to (VOL - a number):
    (- VolumeRaw(gg_foregroundchan,{VOL}); -)

    To set the raw background volume to (VOL - a number):
    (- VolumeRaw(gg_backgroundchan,{VOL}); -)

    To set the raw midground volume to (VOL - a number):
    (- VolumeRaw(gg_thirdchan,{VOL}); -)

    To set the raw midground 0 volume to (VOL - a number):
    (- VolumeRaw(gg_thirdchan,{VOL}); -)

    To set the raw midground 1 volume to (VOL - a number):
    (- VolumeRaw(gg_fourthchan,{VOL}); -)

    To set the raw midground 2 volume to (VOL - a number):
    (- VolumeRaw(gg_fifthchan,{VOL}); -)

    To set the raw midground 3 volume to (VOL - a number):
    (- VolumeRaw(gg_sixthchan,{VOL}); -)

    [Stop Commands]

    To stop the foreground sound:
    (- SoundStop(gg_foregroundchan); -)

    To stop the background sound:
    (- SoundStop(gg_backgroundchan); -)

    To stop the midground sound:
    (- SoundStop(gg_thirdchan); -)

    To stop the midground 0 sound:
    (- SoundStop(gg_thirdchan); -)

    To stop the midground 1 sound:
    (- SoundStop(gg_fourthchan); -)

    To stop the midground 2 sound:
    (- SoundStop(gg_fifthchan); -)

    To stop the midground 3 sound:
    (- SoundStop(gg_sixthchan); -)


    Multiple Sounds ends here.