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
Script Help How Do i Make sound at this Lookat script
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#1
How Do i Make sound at this Lookat script

Hey i wanna add some music when player get Force look
PHP Code: (Select All)
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");


http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
01-04-2012, 07:25 AM
Website Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: How Do i Make sound at this Lookat script

PlaySoundAtEntity?

01-04-2012, 07:26 AM
Find
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#3
RE: How Do i Make sound at this Lookat script

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

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
(This post was last modified: 01-04-2012, 07:32 AM by jessehmusic.)
01-04-2012, 07:30 AM
Website Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#4
RE: How Do i Make sound at this Lookat script

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

01-04-2012, 07:42 AM
Find
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#5
RE: How Do i Make sound at this Lookat script

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

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
01-04-2012, 07:54 AM
Website Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#6
RE: How Do i Make sound at this Lookat script

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

01-04-2012, 07:58 AM
Find
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#7
RE: How Do i Make sound at this Lookat script

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

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
(This post was last modified: 01-04-2012, 08:02 AM by jessehmusic.)
01-04-2012, 07:59 AM
Website Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#8
RE: How Do i Make sound at this Lookat script

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


01-04-2012, 08:10 AM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#9
RE: How Do i Make sound at this Lookat script

(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.
01-04-2012, 09:45 PM
Find




Users browsing this thread: 3 Guest(s)