Frictional Games Forum (read-only)
[SCRIPT] How Do i Make sound at this Lookat script - 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: [SCRIPT] How Do i Make sound at this Lookat script (/thread-12334.html)



How Do i Make sound at this Lookat script - jessehmusic - 01-04-2012

Hey i wanna add some music when player get Force look
PHP Code:
void OnStart()

{
SetEntityConnectionStateChangeCallback("lever""func_shelf");
}

void func_shelf(string &in asEntityint alState)
{
    if (
alState == 1)
    {
    
SetMoveObjectState("shelf",1.0f);
    
PlaySoundAtEntity("""quest_completed.snt""shelf_move_1"0false); }
}
 
  
void StopTimer(string &in asTimer)
 {
  
StopPlayerLookAt();
 }
 
 
void PickNote(string &in asEntity)

 {
    
StartPlayerLookAt("closet_1"5.0f5.0f"");
    
AddTimer("StopLookAt"1.5f"StopTimer");




RE: How Do i Make sound at this Lookat script - flamez3 - 01-04-2012

PlaySoundAtEntity?


RE: How Do i Make sound at this Lookat script - jessehmusic - 01-04-2012

Thanx gonna try Smile
PlaySoundAtEntity("Dont know this one", the .ogg file, The Entyti i think not sure, 1-3, true);
do i have wrong on other place's



RE: How Do i Make sound at this Lookat script - flamez3 - 01-04-2012

(01-04-2012, 07:30 AM)jessehmusic Wrote: Thanx gonna try Smile
PlaySoundAtEntity("Dont know this one", the .ogg file, The Entyti i think not sure, 1-3, true);
do i have wrong on other place's
PlaySoundAtEntity("internal_name" , "sound.snt", "Player", 0, false);



RE: How Do i Make sound at this Lookat script - jessehmusic - 01-04-2012

what mean the "internal_name" name of the item or.. the addtime im confused


RE: How Do i Make sound at this Lookat script - flamez3 - 01-04-2012

(01-04-2012, 07:54 AM)jessehmusic Wrote: what mean the "internal_name" name of the item or.. the addtime im confused
For internal name just put "sound1" (you don't have to put something there). What do you mean addtime?


RE: How Do i Make sound at this Lookat script - jessehmusic - 01-04-2012

nvm about addtime... :S
okey what should i do after i made "sound1"



RE: How Do i Make sound at this Lookat script - flamez3 - 01-04-2012

(01-04-2012, 07:59 AM)jessehmusic Wrote: nvm about addtime... :S
okey what should i do after i made "sound1"
...

PlaySoundAtEntity("internal_name" , "sound.snt", "Player", 0, false);




RE: How Do i Make sound at this Lookat script - Statyk - 01-04-2012

(01-04-2012, 08:10 AM)flamez3 Wrote: ...

PlaySoundAtEntity("internal_name" , "sound.snt", "Player", 0, false);
Exactly.

Not to sound rude, but experiment some, try not to ask too many questions or you won't learn as much.