Jump to content
  • 0

Canceling a soundfile


WhiteEagle

Question


  • Group:  Members
  • Topic Count:  76
  • Topics Per Day:  0.02
  • Content Count:  455
  • Reputation:   57
  • Joined:  08/28/12
  • Last Seen:  

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
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  120
  • Topics Per Day:  0.03
  • Content Count:  295
  • Reputation:   6
  • Joined:  12/02/11
  • Last Seen:  

i think thats hardcoded in the client side
try to create another function and split the wav file, put condition to stop the script

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  76
  • Topics Per Day:  0.02
  • Content Count:  455
  • Reputation:   57
  • Joined:  08/28/12
  • Last Seen:  

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**

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.01
  • Content Count:  416
  • Reputation:   73
  • Joined:  05/16/19
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  116
  • Reputation:   18
  • Joined:  09/08/17
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  76
  • Topics Per Day:  0.02
  • Content Count:  455
  • Reputation:   57
  • Joined:  08/28/12
  • Last Seen:  

Sleep2 doesn't really helps too. But thanks for trying to help.

Link to comment
Share on other sites

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.

×
×
  • Create New...