![]() |
Scripting Question
Is there a way to check what midi is currently being played?
|
Quote:
Example: playmidi whatever.mid; setstring client.midi,whatever; Then set something like: showtext index,x,y,font,style,Now playing: #s(client.midi); I hope you know what I'm talking about. |
that works. i changed my script (its a radio) to play a song from a URL that is stored in a serverr.string. to play the midi i used "play #s(serverr.string);" but it wont play. does anyone know how to make it work?
|
Have you tried showing it in a message?
message #s(serverr.string); Add that to a level, check if it's actually detecting it. |
Quote:
|
Make sure your audio sounds are turned up in options. ;P Alof of times people say they can't hear the radio cause their midi/mp3 sounds are turned off.
|
you could try this:
{play midi; set midi name from above;} then for another NPC that would check it: if(midi name from above){do something;} it would work, but why would you need it? |
Quote:
|
Here's why i use serverr.strings:
For each station, a different song is played and a different message is displayed. instead of having to change the NPC script everytime someone wanted to change the song or display a different message, i stored the message and song filename as serverr.strings. now all i have to do is go into server flags and change them. Here's the problem: When i change the song stored in the serverr.string, everyone using the radio has to turn it off then on to hear the new song. because of this, i put the play command in a timeout loop. to keep them from being played every 0.05 seconds, i need a way to check if the song stored in the serverr.string isnt already being played. |
| All times are GMT +2. The time now is 07:41 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.