Frictional Games Forum (read-only)
Problem with playing sound on pickup! Please help! - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Problem with playing sound on pickup! Please help! (/thread-13488.html)

Pages: 1 2


RE: Problem with playing sound on pickup! Please help! - Zebraa - 02-21-2012

(02-21-2012, 08:43 PM)Your Computer Wrote:
(02-21-2012, 08:40 PM)Zebraa Wrote: Where is the debug menu in HPL Level Editor?

It's a feature of the game, not the level editor. You are testing the sounds in game, right?
Yes. I save the changes, open Amnesia then the map but the sound doesn't play.


RE: Problem with playing sound on pickup! Please help! - Your Computer - 02-21-2012

(02-21-2012, 08:56 PM)Zebraa Wrote: Yes. I save the changes, open Amnesia then the map but the sound doesn't play.

Okay, i rechecked the code, and i'm going to say the reason why it's not playing is because the item is no longer in the map (due to having picking it up). Try playing the sound at "Player".


RE: Problem with playing sound on pickup! Please help! - FinBanana - 02-22-2012

(02-21-2012, 09:14 PM)Your Computer Wrote:
(02-21-2012, 08:56 PM)Zebraa Wrote: Yes. I save the changes, open Amnesia then the map but the sound doesn't play.

Okay, i rechecked the code, and i'm going to say the reason why it's not playing is because the item is no longer in the map (due to having picking it up). Try playing the sound at "Player".
Yeah, I had the same problem and that worked for me. I think that'll do it.




RE: Problem with playing sound on pickup! Please help! - Zebraa - 02-22-2012

(02-21-2012, 09:14 PM)Your Computer Wrote:
(02-21-2012, 08:56 PM)Zebraa Wrote: Yes. I save the changes, open Amnesia then the map but the sound doesn't play.

Okay, i rechecked the code, and i'm going to say the reason why it's not playing is because the item is no longer in the map (due to having picking it up). Try playing the sound at "Player".
Still doesn't work :/

void OnStart()
{
SetEntityPlayerInteractCallback("Lantern_1", "PickedUpLantern", true);
}

void PickedUpLantern(string &in asEntity)
{
PlaySoundAtPlayer("", "grunt/amb_alert.snt", "Lantern_1", 0.1f, false);
}

void OnEnter()
{

}

void OnLeave()
{

}


RE: Problem with playing sound on pickup! Please help! - flamez3 - 02-22-2012

dw c:


RE: Problem with playing sound on pickup! Please help! - Juby - 02-22-2012

There is no such command as "PlaySoundAtPlayer." I'll be honest and say I don't know why the sound isn't playing, but I have a feeling it has something to do with the sound you chose.

Instead of "PlaySoundAtEntity", try "PlayGuiSound("grunt/amb_alert_01.ogg", 1);"
or you can try "PlayGuiSound("grunt/amb_alert.snt", 1);"


RE: Problem with playing sound on pickup! Please help! - Your Computer - 02-22-2012

(02-22-2012, 08:43 AM)Zebraa Wrote: Still doesn't work :/

Do some research in programming, specifically on functions, then study this entire article: http://wiki.frictionalgames.com/hpl2/amnesia/script_functions