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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Phonograph Scripting Help
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#5
RE: Phonograph Scripting Help

My apologies; most of that was off the top of my head, which apparently isn't as reliable as I once thought : /

This will work, tested 100% (note, this still requires the step mentioned about the level editor):


void PhonographScare(string &in EntityName, int alState)
{
if(alState == 1) ///revised int alCount to int alState
{

PlaySoundAtEntity("", "TipToeSong.ogg", "phonograph_1", 5.0f, false);
SetPropStaticPhysics("phonograph_1", true);

}
}

That will fix your error. I noticed you have a .ogg file though I think PlaySound requires a .snt file. Make sure you converted it to a .ogg properly by using a program such as Audacity and didn't just rename an mp3 file; anyways, I'm pretty sure you will need to make a .snt file for it to work properly; then again, its 6:11 am here and that could be the sleep deprivation talking Tongue Here's the easiest way to make your own:

-Choose any .snt file from the sounds folder (I suggest 00_creak.snt, found in the 00 sound folder)
-Open it with NotePad++ or Geany
-Change the sound file under "Main" from "00_creak" to the corresponding name of your .ogg file.

Next, you may want to fix some of the properties; most notably, you will want to set**:

"Volume="float" volume, I believe max is 1.0f
MinDistance="int" an integer (not decimal) is the minimum distance you must be to hear it
MaxDistance="Int" an integer the max distance to hear it; this should be at least 20/30
Loop="bool" loop means replay, true will replay, false will not

You can explore some of the other settings, most of which won't have major effects on the sound; I just went over the most basic properties.

**Change int to corresponding integers (i.e. 1,2,3,4), floats to corresponding decimal values (i.e. 1.0, 0.76, 0.245), and bool to true or false values.

I rate it 3 memes.
06-18-2012, 11:27 AM
Find


Messages In This Thread
Phonograph Scripting Help - by HoyChampoy - 06-15-2012, 04:42 AM
RE: Phonograph Scripting Help - by Pigsareit - 06-15-2012, 02:02 PM
RE: Phonograph Scripting Help - by Adny - 06-15-2012, 02:39 PM
RE: Phonograph Scripting Help - by HoyChampoy - 06-18-2012, 07:30 AM
RE: Phonograph Scripting Help - by Adny - 06-18-2012, 11:27 AM
RE: Phonograph Scripting Help - by HoyChampoy - 06-19-2012, 07:27 AM



Users browsing this thread: 2 Guest(s)