Jump to content
  • 0

Canceling a soundfile


Question

Posted (edited)

I try to add to npc some voices. Trouble comes with longer voice text.
The soundfiles overlap…. Is there a way to end a soundeffect or if one is started to end the old one?

Here as excample:

soundeffect "welcome.wav", 0;
mes("Welcome to the Kafra Corporation. Kafra's Employees are always ready to serve you. How can I help you today?");
next();
switch(select("Storage:Bye")) {
	case 1:
		mes("Blablabla?");
		next;
		break;
	case 2:
		mes("See you later.");
		break;
}
soundeffect "bye.wav", 0;
close();
}


 



 

Edited by WhiteEagle
  • Like 1

6 answers to this question

Recommended Posts

  • 0
Posted

Thanks for your reply.
But I think, adding a condition to stop the script isn't a good idea.
Players are then committed to hear/read the full stuff.
That's why I need a function, what stop the soundfile.
Well, if there no solution, I let npc's talk only short stuff like "Hi there / Welcome / greetings and so on".
Not the best, but better than nothing. 
 **Ragnarok needs more life**

  • 0
Posted
6 hours ago, WhiteEagle said:

Thanks for your reply.
But I think, adding a condition to stop the script isn't a good idea.
Players are then committed to hear/read the full stuff.
That's why I need a function, what stop the soundfile.
Well, if there no solution, I let npc's talk only short stuff like "Hi there / Welcome / greetings and so on".
Not the best, but better than nothing. 
 **Ragnarok needs more life**

Yep I was gonna suggest something shorter... might be your only options

  • 0
Posted
soundeffect "welcome.wav", 0;
---- sleep2 500 ----
mes("Welcome to the Kafra Corporation. Kafra's Employees are always ready to serve you. How can I help you today?");
next();
switch(select("Storage:Bye")) {
	case 1:
		mes("Blablabla?");
		next;
		break;
	case 2:
		mes("See you later.");
		break;
}

soundeffect "bye.wav", 0;
close();
}

sleep2 after welcome wav should give you more than sufficient time

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...