Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with playing sound on pickup! Please help!
Author Message
Zebraa Offline
Junior Member

Posts: 7
Joined: Feb 2012
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,475
Joined: Jul 2011
Reputation: 235
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
FinBanana Offline
Junior Member

Posts: 29
Joined: Jan 2012
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Zebraa Offline
Junior Member

Posts: 7
Joined: Feb 2012
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,285
Joined: Apr 2011
Reputation: 57
Post: #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 all posts by this user Quote this message in a reply
Juby Away
Senior Member

Posts: 290
Joined: May 2011
Reputation: 5
Post: #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 all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,475
Joined: Jul 2011
Reputation: 235
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)