I dont know how to add a sound , for exemple, when a quest is accepted. There is posible?
Let's say that i have a general sound in background. When the actor accept the quest i want to play a quest sound. Something like that!
Note: if there is topics with this subject, i really want the link.
Hi! Welcome to the forum for Platinum Arts Sandbox Free 3D Game Maker. I currently have the forums locked as I am attempting to properly update them.
In the meantime please join the new Discord Server!
If you have any questions please e-mail me through the Platinum Arts website.
In the meantime please join the new Discord Server!
If you have any questions please e-mail me through the Platinum Arts website.
Specific sounds
-
- Support Team
- Posts: 2458
- Joined: April 27th, 2010, 5:31 pm
- IRC Username: CP
Re: Specific sounds
this is a coding thing, I don't know what mode you're using (and if it's RPG, I don't know RPG scripting), but here's some pseudocode based on fps cubescript:
like said, I don't know the specific code to play the sound, but I believe you can have the sound play if you have it activated after selecting a guioption that way.
Code: Select all
level_trigger_1 = [showgui person]
newgui person [
guitext "hi, what's up?"
guibar
guibutton "not much" [showgui person2]
guibutton "(say nothing)" [cleargui]
]
newgui person2 [
guitext "I need you to go on a quest."
guibar
guibutton "yes." [sound code plays; showgui person3]
guibutton "no" [cleargui]
Julius wrote:Contribute to http://www.opengameart.org NOW!
Save the wiki!
Re: Specific sounds
Hi,
I looked in the rpgscript.cpp file and found this reference.
So maybe there is a r_sound() function you can call in the script and pass it the sound file?
I could not find any tutorials or references as to how to get this to work so you will have to play with it and
see if it works.
I looked in the rpgscript.cpp file and found this reference.
Code: Select all
ICOMMAND(r_sound, "ss", (const char *p, const char *r),
if(*r)
{
getreference(r, ent, ent->getent(entidx), , r_sound)
playsoundname(p, &ent->getent(entidx)->o);
}
else
playsoundname(p);
)
I could not find any tutorials or references as to how to get this to work so you will have to play with it and
see if it works.
Re: Specific sounds
It works but not as expected. Here is what I coded up.
The issues are that the file needs to be a wave type and also the sound plays as soon as the the text branch is entered regardless
of how you respond. So it is firing at a higher level than the conversation code it running. Maybe it would be better to set a variable
when you enter the correct text path and then let that trigger the sound to play. It is just a thought.
Regards,
Lou
Code: Select all
// Lou NPC script
include scripts/1
//start conversation
r_script_node "main" [result "[Move along and stay out of trouble.]"] [
r_response "Will do." normal //goes to dialogue normal
r_sound "/aard/bang"
r_response "Goodbye" "" //closes the dialogue
]
//normal path
r_script_node "normal" [result "[Have a nice day.]" ] [
r_response "Goodbye" ""
]
of how you respond. So it is firing at a higher level than the conversation code it running. Maybe it would be better to set a variable
when you enter the correct text path and then let that trigger the sound to play. It is just a thought.
Regards,
Lou
Re: Specific sounds
I'm still working on sounds. thank's for help.
- kddekadenz
- Member
- Posts: 423
- Joined: July 17th, 2011, 11:02 am
- Name: kdd
- Contact:
Re: Specific sounds
Actually not. PAS supports mp3 and ogg, too. 2.8 does add FLAC support.Lou wrote: The issues are that the file needs to be a wave type
Then put the command into the respondLou wrote: and also the sound plays as soon as the the text branch is entered regardless
of how you respond.
Kelgar is an advanced RPG beeing developed in Sandbox