Meteor Scripting Functions
Audio
void playSound(string soundName)
Play a sound locally without spatialisation.
playSound("battle");
void playSound2D(vector2 pos, string soundName)
Play a sound from a 2D position.
playSound2D(getPos(getPlayer()), "battle");
If run from the server the sound is also played on all clients.
If run from a client the sound is local only.
void playMusic(string musicFileName)
Play music from file.
playMusic("ALTWORLD.MOD");
Pass a filename only to search in base\music.
Pass an absolute path to play from another location.
Supported formats include Ogg Vorbis, MOD, S3M, XM.
float getMusicPos()
Get the currently playing music position in seconds.
print(getMusicPos())
void setMusicPos(float seconds)
Seek the currently playing music to the current position in seconds.
setMusicPos(30);
string getMusicFilename()
Get the currently playing music filename.
print(getMusicFilename())
void stopMusic()
Stop music playing.
stopMusic();
Music is stopped and cannot be resumed (use playMusic to play more music).
Music will not resume until a new level is started.
void restartMusic()
Rewind currently playing music to the start.
restartMusic();
void pauseMusic()
Pause currently playing music.
pauseMusic();
void resumeMusic()
Resume current music.
pauseMusic();
void isMusicPaused()
Is music paused?
if(isMusicPaused())
{
print("Music is paused");
}
else
{
print("Music is not paused");
}
Index
Generated on the 15 May 2024 at 09:00:40 (UK Time)