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.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ Incorporating sound buffers into an existing .mct file
|
Incorporating sound buffers into an existing .mct file
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Imloti
USA (4 posts) Bio
|
| Date
| Thu 26 Apr 2018 08:42 AM (UTC) |
| Message
| I have a fairly complex set of triggers for a MUD that I play. When I created them (all through the dialog box), I did not know about sound buffers that would allow more than one sound to play at a time. I have fiddled with the .mct file and cannot figure out how to incorporate the buffers into what I already have. An example of one of my existing triggers is:
</trigger>
<trigger
enabled="y"
match="* A marking on the ground indicates that this area has already been explored."
sequence="100"
sound="D:\\MUSHclient\sounds\beep1.wav"
>
</trigger>
I know that what I want to add looks something like this:
PlaySound (0, "D:\\MUSHclient\sounds\beep1.wav", false, 0, 0)
The problem I'm having is how to incorporate the two. Any assistance would be appreciated. Thank you! | | Top |
|
| Posted by
| Fiendish
USA (2,555 posts) Bio
Global Moderator |
| Date
| Reply #1 on Thu 26 Apr 2018 10:55 AM (UTC) Amended on Thu 26 Apr 2018 10:59 AM (UTC) by Fiendish
|
| Message
| Try
<trigger
enabled="y"
match="* A marking on the ground indicates that this area has already been explored."
sequence="100"
send_to="12"
>
<send>
PlaySound (0, "D:\\MUSHclient\sounds\beep1.wav", false, 0, 0)
</send>
</trigger>
Notice the bits that say send_to="12" and <send>...</send>
The interface entry equivalent is that in the trigger edit window you would put the PlaySound invocation in the send box, and then you tell the trigger to send to script. |
https://github.com/fiendish/aardwolfclientpackage | | Top |
|
| Posted by
| Imloti
USA (4 posts) Bio
|
| Date
| Reply #2 on Thu 26 Apr 2018 11:01 AM (UTC) |
| Message
| | Thank you so much. This is perfect. | | Top |
|
| Posted by
| Imloti
USA (4 posts) Bio
|
| Date
| Reply #3 on Thu 26 Apr 2018 12:57 PM (UTC) |
| Message
| The only problem I'm having now is I'm getting a ton of compile errors. Things like:
Compile error
World: StarC
Immediate execution
[string "Trigger: "]:1: '<name>' expected near '/'
and
Compile error
World: StarC
Immediate execution
[string "Trigger: "]:1: function arguments expected near '.'
It looks like it's something with line 1? Which is:
<?xml version="1.0" encoding="iso-8859-1"?>
But I haven't touched that. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #4 on Thu 26 Apr 2018 08:08 PM (UTC) Amended on Thu 26 Apr 2018 08:10 PM (UTC) by Nick Gammon
|
| Message
| Do not replace the </trigger> in your initial post. That was the end of the previous trigger. Each trigger should look like this:
What might be easier would be to make a new (empty) world file, import the triggers from the .mct file, amend them in the GUI interface, and write them all back to the .mct file. Make a backup first.
As Fiendish said, in the trigger GUI interface:
- Change “Send to” to be “Script”
- Change Sound to “(no sound)” by clicking the “No sound” button
- Add into the Send box the small script he showed. The default place to look for sounds is the sound directory, and some arguments are optional, so it could simplified to:
The default sounds directory can be checked by executing this in the Immediate scripting window:
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Imloti
USA (4 posts) Bio
|
| Date
| Reply #5 on Thu 26 Apr 2018 08:12 PM (UTC) |
| Message
| | Thank you, Nick. I ended up having someone look at just one of the triggers from the file and turns out I was making a mistake that my high school computer programming teacher warned me about. I was leaving off a quote prior to the file name. And as much as I stared at it, I didn't see it was missing. All works perfectly now and this amazing person also helped me set it so they play in the background so that I don't have to be in the MC window in order for them to play. Thanks to all of you and this other person...I've got it straight. | | 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.
18,436 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top