SC_PlayDirectionalNumber

Usage

void SC_PlayDirectionalNumber( int SoundNumber, int x, int z, string &InstanceId)


Summary

Plays the specified sound from the specified 2D coordinates.


More Information

Use this function to play a sound from a specified source coordinates or to play loop sounds.

To play a loop sound pass the same instance ID (just make one up that is unique) each time you call this function and keep calling it!

- SoundNumber is the number of the sound to play (use SC_GetSoundNumber to get the sound number).
- x, z are the 2D map coordinates to play the sound from.
- InstanceId is the instance ID for loops sounds (pass an empty string "" for non-loop sounds).

Directional sounds are not played when the player is dead.


Example

int ExplodeSoundNumber, HelicopterSoundNumber;

// get sound numbers
ExplodeSoundNumber = SC_GetSoundNumber( "contact\\explode");
HelicopterSoundNumber = SC_GetSoundNumber( "loops\\BigHeli");

// play an explosion sound from 2D coordinates 100,100
SC_PlayDirectionalNumber( ExplodeSoundNumber, 100, 100, "");

// play a loop sound from the same position using a made up instance ID
SC_PlayDirectionalNumber( HelicopterSoundNumber, 100, 100, "Heli_1267121");


Last Revised: 10 May 2008

Full Functions List


Copyright 2008 by James Bunting
www.jbgames.com/games/rod3d/

This page was automatically generated by jbgames Script Docs Generator