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
Problem with playing sound on pickup! Please help!
Zebraa Offline
Junior Member

Posts: 7
Threads: 1
Joined: Feb 2012
Reputation: 0
#11
RE: Problem with playing sound on pickup! Please help!

(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.
02-21-2012, 08:56 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#12
RE: Problem with playing sound on pickup! Please help!

(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".

Tutorials: From Noob to Pro
02-21-2012, 09:14 PM
Website Find
FinBanana Offline
Junior Member

Posts: 29
Threads: 4
Joined: Jan 2012
Reputation: 0
#13
RE: Problem with playing sound on pickup! Please help!

(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.

02-22-2012, 06:24 AM
Find
Zebraa Offline
Junior Member

Posts: 7
Threads: 1
Joined: Feb 2012
Reputation: 0
#14
RE: Problem with playing sound on pickup! Please help!

(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()
{

}
02-22-2012, 08:43 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#15
RE: Problem with playing sound on pickup! Please help!

dw c:

(This post was last modified: 02-22-2012, 09:03 AM by flamez3.)
02-22-2012, 09:02 AM
Find
Juby Away
Senior Member

Posts: 290
Threads: 2
Joined: May 2011
Reputation: 5
#16
RE: Problem with playing sound on pickup! Please help!

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);"

Insanity. Static.
(This post was last modified: 02-22-2012, 12:57 PM by Juby.)
02-22-2012, 12:55 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#17
RE: Problem with playing sound on pickup! Please help!

(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/amn..._functions

Tutorials: From Noob to Pro
02-22-2012, 06:34 PM
Website Find




Users browsing this thread: 2 Guest(s)