Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripting issues: sounds & other.
ObsidianLegion Offline
Member

Posts: 173
Threads: 53
Joined: Jun 2011
Reputation: 0
#11
RE: Scripting issues: sounds & other.

(08-30-2011, 09:47 PM)Enexeus Wrote:
(08-30-2011, 09:39 PM)Lolnesia09 Wrote:
(08-30-2011, 09:31 PM)Enexeus Wrote:
(08-30-2011, 09:20 PM)Lolnesia09 Wrote: Try upping the Volume to 60. If i'm not mistaken it's out of 100. Like a master volume control. Set a min distance to 1. Set use3D to true. See if that works.

It didn't work. :/
Thanks for the idea though.

Did you add them in the editor using the sound tool?

I have, problem is, the sounds play as soon as the map has launched instead of when I pick up the key.

I've made the sound inactive on the map editor and added this line of script at the right place:

SetEntityActive("pianosound_1.snt", true);

-Enexeus

Umm a sound file isn't an entity.

Look something up in the Functions page.

Like

Onstart()
{
SetEntityPlayerInteractCallback("YourKeyName", "Musicplay", true);
}

void Musicplay(string &in asEntity)
{
PlayMusic("pianosound_1.snt", true/false*, 50, 0, 1, true/false*);
}

Try that
*The first true/false is to state weather you want the sound to loop
*The second true/false mentions bool abResume I don't know what that does so play around with that


"Good men mean well; they just don't always end up doing well." -Isaac Clarke, Dead Space 2, Chapter 12
08-30-2011, 10:24 PM
Find
Juby Away
Senior Member

Posts: 290
Threads: 2
Joined: May 2011
Reputation: 5
#12
RE: Scripting issues: sounds & other.

To correct you in the very first post,

it's general_piano01.snt
not Pianosound_1.snt

Insanity. Static.
08-30-2011, 10:43 PM
Find
xiphirx Offline
Senior Member

Posts: 662
Threads: 16
Joined: Nov 2010
Reputation: 5
#13
RE: Scripting issues: sounds & other.

Where is the actual sound file (.ogg) in relation to the .snt file? (should be next to each other based on your snt file)


08-31-2011, 03:55 AM
Find
Enexeus Offline
Junior Member

Posts: 7
Threads: 1
Joined: Aug 2011
Reputation: 0
#14
RE: Scripting issues: sounds & other.

(08-30-2011, 10:24 PM)Lolnesia09 Wrote: Umm a sound file isn't an entity.

Look something up in the Functions page.

Like

Onstart()
{
SetEntityPlayerInteractCallback("YourKeyName", "Musicplay", true);
}

void Musicplay(string &in asEntity)
{
PlayMusic("pianosound_1.snt", true/false*, 50, 0, 1, true/false*);
}

Try that
*The first true/false is to state weather you want the sound to loop
*The second true/false mentions bool abResume I don't know what that does so play around with that

Meh... it didn't work :/
I have no idea as to why some sounds do work and other don't.

(08-30-2011, 10:43 PM)Juby Wrote: To correct you in the very first post,

it's general_piano01.snt
not Pianosound_1.snt

It's a custom sound I imported. Wink

(08-31-2011, 03:55 AM)xiphirx Wrote: Where is the actual sound file (.ogg) in relation to the .snt file? (should be next to each other based on your snt file)

Yeah, they're placed next to eachother.

Lolnesia09, thanks for your solution. Smile
But I just might end up using the PlayGuiSound after all, since it's a lot easier to work with, hehe.

Thanks!
08-31-2011, 09:30 AM
Find
ObsidianLegion Offline
Member

Posts: 173
Threads: 53
Joined: Jun 2011
Reputation: 0
#15
RE: Scripting issues: sounds & other.

It's okay my friend!

Happy creating!

"Good men mean well; they just don't always end up doing well." -Isaac Clarke, Dead Space 2, Chapter 12
08-31-2011, 01:31 PM
Find




Users browsing this thread: 2 Guest(s)