The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Stopping a playing phonograph mid-piece
THomura Offline
Junior Member

Posts: 7
Threads: 2
Joined: Mar 2014
Reputation: 0
#1
Stopping a playing phonograph mid-piece

I am trying to find a script that will stop whatever sound a phonograph is playing in the middle of said sound when a lever is pulled. I have tried using the StopSound and StopMusic scripts but they unfortunately do not work. When I pull the lever every other script functions perfectly but the phonograph still plays!

Here is the script I am using:

void PlayHorrorNoise(string &in asEntity, int alState)
{
if(alState == 1)
{
PlaySoundAtEntity("", "mors_praematura.snt", asEntity, 0, false);
}
}

/////the script that is activated when the phonograph is wound, and

void GalleryLights(string &in asEntity, int alState)
{
if (alState == 1)
{
StopSound("mors_praematura.snt", 1);
FadeLightTo("GalleryLight", 0.5, 0.395, 0.1, 1, -1, 6);
SetLeverStuckState("GalleryLever", 1, false);
SetLampLit("lamp_1", true, true);
SetLampLit("lamp_2", true, true);
}
}

/////the script that is activated when the lever is pulled.

I hope I did a decent job of explaining my conundrum. I'd be happy to provide any other information should it be needed and I welcome any and all suggestions. Thanks!
03-25-2014, 04:21 AM
Find


Messages In This Thread
Stopping a playing phonograph mid-piece - by THomura - 03-25-2014, 04:21 AM



Users browsing this thread: 1 Guest(s)