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
Scare Sound?
zergling50 Offline
Member

Posts: 74
Threads: 9
Joined: Jul 2012
Reputation: 1
#1
Scare Sound?

So I have this code set up and I want it to play a sound when someone finished reading a note. I tried using this code:
////////////////////////////
// Run when starting map
void OnStart()
{
AddUseItemCallback("", "key_study_1", "mansion_3", "KeyOnDoor2", true);
SetEntityPlayerInteractCallback("note_paper01_3", "ScareNoise1", true);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
void ActivateMonster(string &in asItem)
{
}
void KeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door", asEntity, 0.0f, false);
RemoveItem(asItem);
}
void ScareNoise1()
{
PlaySoundAtEntity("", "scare_baby_cry1.ogg", "Player", 0, false);
PlaySoundAtEntity("", "scare_steps_big5.ogg", "Player", 0, false);
PlaySoundAtEntity("", "scare_tingeling_rev2.ogg", "Player", 0, false);
}
It wont however work, but thanfully doesnt crash or give me any errors. Do I need to use something other than
SetEntityPlayerInteractCallback to make it work with a note?
EDIT: Sorry, I said "a" sound but I actually want it to play a chorus of those three sounds at once.
(This post was last modified: 07-22-2012, 05:06 PM by zergling50.)
07-18-2012, 09:12 PM
Find


Messages In This Thread
Scare Sound? - by zergling50 - 07-18-2012, 09:12 PM
RE: Scare Sound? - by Kazakarumariou - 07-18-2012, 09:20 PM
RE: Scare Sound? - by zergling50 - 07-18-2012, 10:03 PM
RE: Scare Sound? - by Adny - 07-18-2012, 10:14 PM
RE: Scare Sound? - by zergling50 - 07-18-2012, 10:16 PM
RE: Scare Sound? - by Kazakarumariou - 07-18-2012, 11:16 PM
RE: Scare Sound? - by Adny - 07-18-2012, 11:34 PM
RE: Scare Sound? - by Adny - 07-18-2012, 10:22 PM
RE: Scare Sound? - by zergling50 - 07-18-2012, 11:51 PM
RE: Scare Sound? - by Adny - 07-19-2012, 12:10 AM
RE: Scare Sound? - by zergling50 - 07-19-2012, 12:25 AM
RE: Scare Sound? - by Adny - 07-19-2012, 12:31 AM
RE: Scare Sound? - by zergling50 - 07-19-2012, 12:40 AM
RE: Scare Sound? - by Streetboat - 07-19-2012, 12:32 AM
RE: Scare Sound? - by Adny - 07-19-2012, 12:45 AM
RE: Scare Sound? - by zergling50 - 07-19-2012, 01:05 AM
RE: Scare Sound? - by zergling50 - 07-19-2012, 04:47 PM
RE: Scare Sound? - by zergling50 - 07-20-2012, 08:07 PM
RE: Scare Sound? - by Kazakarumariou - 07-20-2012, 08:38 PM
RE: Scare Sound? - by zergling50 - 07-20-2012, 10:04 PM
RE: Scare Sound? - by Kazakarumariou - 07-21-2012, 07:23 PM
RE: Scare Sound? - by zergling50 - 07-22-2012, 05:06 PM



Users browsing this thread: 1 Guest(s)