Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ General ➜ Simultaneous Sounds

Simultaneous Sounds

Posting of new messages is disabled at present.

Refresh page


Posted by Dukeskath   (11 posts)  Bio
Date Tue 06 Aug 2024 11:48 AM (UTC)
Message
I'm a total noob with MUSHClient and scripting and triggers, but I love playing MUDs with sound.

While playing Aardwolf I'm using the soundpack plugin, but I also want a step sound (S1) to play when I move. This is working fine with a simple trigger when the game displays "Exits:".

However, I would also like a chime (S2) to play when I arrive at recall. (Triggered on "The Grand City of Aylor (G)".) Works fine when I disable the step trigger.

Alas, when I step into the recall room, I only hear S1. I tried changing the S1 trigger sequence to 105 — S2 is default 100 — because I read somewhere that such a thing might help triggers work properly. No luck.

Any help is appreciated.
Top

Posted by Fiendish   USA  (2,533 posts)  Bio   Global Moderator
Date Reply #1 on Tue 06 Aug 2024 12:15 PM (UTC)

Amended on Tue 06 Aug 2024 12:26 PM (UTC) by Fiendish

Message
I think the answer to this depends on exactly which mechanism you're using to play sounds and also what format your sounds are in. We need to see your triggers.

Template:copying For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Dukeskath   (11 posts)  Bio
Date Reply #2 on Tue 06 Aug 2024 12:24 PM (UTC)
Message
Thank you very much for the speedy reply. I apologize for my total lack of knowledge.

The page to which you linked is about a script function. Is that different from triggers? I feel like scripting is a huge labyrinth into which I may not be ready to step.

If there's no way to remedy the problem with triggers alone, I may just endure the single-sound situation.
Top

Posted by Fiendish   USA  (2,533 posts)  Bio   Global Moderator
Date Reply #3 on Tue 06 Aug 2024 12:26 PM (UTC)
Message
Sorry, I've updated my reply to back up a step. Please read it anew.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Dukeskath   (11 posts)  Bio
Date Reply #4 on Tue 06 Aug 2024 12:58 PM (UTC)
Message
Fiendish said:

We need to see your triggers.


Yes, of course.

---

S1 (step):

<triggers>
<trigger
enabled="y"
keep_evaluating="y"
match="*Exits:*"
sequence="105"
sound="C:\Users\scart\OneDrive\Documents\MUDs\MUD Sounds\step.wav"
>
</trigger>
</triggers>

---

S2 (recall):

<triggers>
<trigger
enabled="y"
keep_evaluating="y"
match="The Grand City of Aylor (G)"
sequence="100"
sound="C:\Users\scart\OneDrive\Documents\MUDs\MUD Sounds\tone03.wav"
>
</trigger>
</triggers>

---

Thanks again for your assistance.
Top

Posted by Fiendish   USA  (2,533 posts)  Bio   Global Moderator
Date Reply #5 on Tue 06 Aug 2024 03:24 PM (UTC)

Amended on Wed 07 Aug 2024 01:03 PM (UTC) by Fiendish

Message
I don't know why there are multiple different internal mechanisms in MUSHclient for playing sound, but IIRC the old trigger sound mechanism does not support playing more than one at a time.

If you use these instead, I think it should work...


<triggers>
  <trigger
   enabled="y"
   keep_evaluating="y"
   match="*Exits:*"
   send_to="12"
  >
  <send>PlaySound(0, "C:/Users/scart/OneDrive/Documents/MUDs/MUD Sounds/step.wav", false)
</send>
  </trigger>
</triggers>



<triggers>
  <trigger
   enabled="y"
   keep_evaluating="y"
   match="The Grand City of Aylor (G)"
   send_to="12"
  >
  <send>PlaySound(0, "C:/Users/scart/OneDrive/Documents/MUDs/MUD Sounds/tone03.wav", false)
</send>
  </trigger>
</triggers>

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Dukeskath   (11 posts)  Bio
Date Reply #6 on Tue 06 Aug 2024 03:44 PM (UTC)
Message
Thank you! Alas, I'm not sure where to add that code. I tried using the trigger window, changing "Sent to" to "Script" and adding the code into the "Send" window above. No luck.

I tried adding it to the "External Script File" under the World Properties menu. No luck.

Thanks for your help. Sorry for being such a clueless novice.
Top

Posted by Fiendish   USA  (2,533 posts)  Bio   Global Moderator
Date Reply #7 on Tue 06 Aug 2024 07:10 PM (UTC)
Message
Quote:
Alas, I'm not sure where to add that code


Template:pasting For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Dukeskath   (11 posts)  Bio
Date Reply #8 on Tue 06 Aug 2024 09:01 PM (UTC)
Message
You're going to hate me.

I followed those directions and it won't play either sound. I know the trigger is working because when I tell it to highlight the matched text, that works.

If you have any ideas about what else we could try, I'm all ears. I tried making a new directory in my MUSHClient folder with the same sounds and adjusting the path.. but it didn't fix it. Perhaps I did it wrong?
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #9 on Wed 07 Aug 2024 06:34 AM (UTC)

Amended on Wed 07 Aug 2024 06:35 AM (UTC) by Nick Gammon

Message
Dukeskath said:

You're going to hate me.


We don't hate you.

In Lua, to put backslashes inside a string as Fiendish did, you need to double them, so it would be:


PlaySound(0, "C:\\Users\\scart\\OneDrive\\Documents\\MUDs\\MUD Sounds\\step.wav", false)


Or, more simply, use forward slashes.




Fiendish said:

I don't know why there are multiple different internal mechanisms in MUSHclient for playing sound ...


Incremental improvements + backwards compatibility.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Fiendish   USA  (2,533 posts)  Bio   Global Moderator
Date Reply #10 on Wed 07 Aug 2024 01:04 PM (UTC)
Message
Lol, oops. I've edited my post to use forward slashes instead. Sorry for not testing it first.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Dukeskath   (11 posts)  Bio
Date Reply #11 on Wed 07 Aug 2024 02:34 PM (UTC)
Message
Thank you both! (And thanks for not hating me, heh.)

I look forward to trying this out later today. Fingers crossed!
Top

Posted by Dukeskath   (11 posts)  Bio
Date Reply #12 on Wed 07 Aug 2024 06:48 PM (UTC)
Message
It worked!

It's a pretty small thing, but it means SO much that you stuck it out and helped me. Thank you, both of you, a billion times!
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.


3,007 views.

Posting of new messages is disabled at present.

Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.