play filename; | plays a sound file or whatever can be played - This will start any file that windows media player can read. |
if (playerenters){
play djshadow.mp3; } |
Plays the mp3, djshadow.mp3 when the player enters the level. |
play2 filename,x,y,volume; | plays a sound/music at x,y with the specified volume (1=default volume) - This allows you to specify WHERE the sound you are playing is comming from (for special effects and what not). |
if (playerenters){
play2 explosion.wav,1,1,.5; setplayerprop #c,What was that?!; } |
When the player enters the level an explosion (although it is really only the noise, not an explosion) will occur at 1,1 with a volume of .5 (can only be 0 to 1). |
playlooped filename; | plays a sound file (*.wav) looped - This will play the specified wav file endlessly. |
if (created){
playlooped sword.wav; } |
Plays the wav file "sword.wav" in a loop when the NPC is created. |
stopsound filename; | stops playing a sound file (*.wav) - This ends the endless loop of a wav. |
if (washit){
stopsound sword.wav; } |
Ends the loop of the file "sword.wav". |
stopmidi; | stops playing the currently running midi file - If a midi is currently looping, this will stop it. |
if (playerenters){
stopmidi; } |
When the player enters the level, the currently playing midi will be stopped. |
setmusicvolume left,right; | adjust speaker volume - Sets the volume of the music for each speaker independently. |
if (playerenters) {
setmusicvolume .1,1; } |
This will make the music comming out of the right speaker a lot louder. You can use something like this if for example there is a juke box on the right side of the room and you want more sound comming from that direction. |
openurl URL; | opens the given URL in the default web browser (without the leading http://!) - Displays a web page. |
if (playertouchsme){
openurl www.graalonline.com; } |
Will displayer GraalOnline's home page when the NPC is touched. |
openurl2 URL,width,height; | opens an url in a window - This opens the URL faster than "openurl" and you can specify the window size. Don't put an "http://" at the beginning of the URL. |
if (playertouchsme){
openurl2 www.yahoo.com,480,640; } |
Will open Yahoo!'s homepage in a window that is 480x640 pixels large. |
showfile filename; | opens the file with the program associated with the file extension - Opens the specified file using the program that is associated with the file extension. |
if (playertouchsme){
showfile me2.jpg; } |
Will show the file me2.jpg, using the program associated with .jpg. |