Gammon Forum
Entire forum
MUSHclient
Lua
looping music for soundpacks
looping music for soundpacks
|
It is now over 60 days since the last post. This thread is closed.
 
Refresh page
Posted by
| Musicmyxtress
(3 posts) bio
|
Date
| Wed 12 May 2021 01:53 AM (UTC) |
Message
| Hi everyone,
So I want to start making my own soundpacks for muds. I'm good with triggers and aliases and timers, but never really gotten into scripting much. Still I have learned how to play a sound that loops, but I have one last problem and I've never found script examples to look at. I play a mud where there are different room types. what I want to do is make ambiences for each one. In the room desc it says the type on its own line, for instance, jungle biome. I'd like to make it loop a jungle sound when it's a jungle biome, but keep looping if youo walk into another jungle, but change if you go into another type. I know this can be done because it has been done in other muds, but in those I can't for the life of me find their scripts.
If anyone can give any advice on this, I'd be forever greatful. | top |
|
Posted by
| Nick Gammon
Australia (22,928 posts) bio
Forum Administrator |
Date
| Reply #1 on Wed 12 May 2021 07:17 AM (UTC) |
Message
| Well, you store (remember) the room type, and when you change rooms see if the new room type is the same as the old room type. If so, do nothing. If not, change the music, and store the new room type. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
Posted by
| Musicmyxtress
(3 posts) bio
|
Date
| Reply #2 on Wed 12 May 2021 01:36 PM (UTC) |
Message
| Ok, thanks. what I'm still struggling with is where you would do that. It's a specific line in every room. I'm not sure how I would tell it to get that line and store it. Would I, as I originally thought, make a different trigger for each biome type? or do I have to write a script file with some empty variable and then somehow recognize that line as the one to update it? Apologies for my newbieness. | top |
|
Posted by
| Fiendish
USA (2,500 posts) bio
Global Moderator |
Date
| Reply #3 on Wed 12 May 2021 01:58 PM (UTC) Amended on Wed 12 May 2021 01:59 PM (UTC) by Fiendish
|
Message
|
Quote: Would I, as I originally thought, make a different trigger for each biome type?
If you want, sure. Or if the lines are all sufficiently similar maybe you could use one trigger with a wildcard capture. |
https://github.com/fiendish/aardwolfclientpackage | top |
|
Posted by
| Musicmyxtress
(3 posts) bio
|
Date
| Reply #5 on Wed 12 May 2021 11:21 PM (UTC) |
Message
| Thank you, I've bookmarked this so i can try to learn how to use it. This will definitly help. | top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
10,816 views.
It is now over 60 days since the last post. This thread is closed.
 
Refresh page
top
Quick links:
MUSHclient.
MUSHclient help.
Forum shortcuts.
Posting templates.
Lua modules.
Lua documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.