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
Script Help PlaySoundAtEntity bug
goodcap Offline
Member

Posts: 193
Threads: 112
Joined: Jun 2012
Reputation: 3
#1
PlaySoundAtEntity bug

I am working on a custom story and this is what i'm trying to do:

You walk to a door and you try to open it. It's locked and there's a memento added. It tell the player to get the key and you hear the writing sound effect.
This where the problem happens. The settings make it that when you click the door once, the script gets de-activated so you won't be getting 10 million mementos if you spam the door. This doesn't count for the PlaySoundAtEntity for some reason. If I spam click the door you keep hearing the writing noise.


This is my script:

void OnStart()
{
SetEntityPlayerInteractCallback("LibraryDoor", "LibDoor", true);
}

void LibDoor(string &in asEntity)
{
AddQuest("NeedKeyForLibDoor", "NeedKey");
PlaySoundAtEntity("", "MementoWriting.ogg", "Player", 0, false);
}

Everything works except that it does not disable the MementoWriting sound after the player clicked the door once.
05-11-2016, 09:34 PM
Find


Messages In This Thread
PlaySoundAtEntity bug - by goodcap - 05-11-2016, 09:34 PM
RE: PlaySoundAtEntity bug - by Daemian - 05-11-2016, 11:59 PM
RE: PlaySoundAtEntity bug - by Darkfire - 05-12-2016, 08:38 PM
RE: PlaySoundAtEntity bug - by Mudbill - 05-12-2016, 09:20 PM
RE: PlaySoundAtEntity bug - by Spelos - 05-14-2016, 07:39 AM



Users browsing this thread: 1 Guest(s)