User Tools

Site Tools


hpl2:tutorials:script:page

Link to this comparison view

Both sides previous revision Previous revision
hpl2:tutorials:script:page [2012/07/28 17:23]
solipsist [Having the sounds] Correcting shizzle.
hpl2:tutorials:script:page [2014/11/01 22:22] (current)
romulator [Making the sound work in Amnesia] Removed some php code.
Line 23: Line 23:
 ===== Making the sound work in Amnesia ===== ===== Making the sound work in Amnesia =====
  
 +Create a **.txt** file and name it the name of your sound'​s Script, open it with any Text Editor you use. I use [[http://​wiki.frictionalgames.com/​hpl2/​third_party_tools/​text/​notepad?​s[]=notepad|Notepad++]]. I named my file __**tutorial**__**.txt**.
  
-Create a **.txt** file and name it the name of your sound'​s Script, open it with any Text Editor you use. I use [[http://​wiki.frictionalgames.com/​hpl2/​third_party_tools/​text/​notepad?​s[]=notepad|Notepad++]]. I named my file __**tutorial**__ **.txt**. +In the file, you can edit quite a few things, and among them is..//​Adding your sound-file into the script!// And since my sound file is __**door**__**.ogg**,​ It shall go to the **MAIN** section. Random soundfiles will be covered later on.
- +
- +
-In the file, you can edit quite a few things, and among them is..//​Adding your sound-file into the script!// And since my sound file is __**door**__ **.ogg**, It shall go to the **MAIN** section. Random soundfiles will be covered later on.+
 <​code>​ <​code>​
 <​SOUNDENTITY>​ <​SOUNDENTITY>​
- <​SOUNDS> ​+ <​SOUNDS>​
    <​Main>​    <​Main>​
-      <Sound File="<font 9pt:​normal/​auto;;​rgb(255,​ 0, 0);;​inherit>​door.ogg</​font> ​" />+      <Sound File="​door.ogg"​ />
    ​ </​Main>​    ​ </​Main>​
    </​SOUNDS>​    </​SOUNDS>​
Line 38: Line 36:
 </​SOUNDENTITY>​ </​SOUNDENTITY>​
 </​code>​ </​code>​
- 
  
 Maybe you're asking, what the hell is all of this? I will explain : Maybe you're asking, what the hell is all of this? I will explain :
- 
  
 <​**SOUNDENTITY** > is the start of the sound file to know what it will play, it can only have one. (Like the extra_english file you have normally in your Custom Story :)) <​**SOUNDENTITY** > is the start of the sound file to know what it will play, it can only have one. (Like the extra_english file you have normally in your Custom Story :))
- 
  
 <​**SOUNDS** > is the sound what it will play <​**SOUNDS** > is the sound what it will play
- 
  
 <​**Main** > is the main sound it will play, i don't know if there exist other categories for that. But use it <​**Main** > is the main sound it will play, i don't know if there exist other categories for that. But use it
- 
  
 <**Sound File** =" //​YourFileName//​.ogg"​ /> is the sound file it will play, if you add multiple sound files, it will play the sounds randomly. <**Sound File** =" //​YourFileName//​.ogg"​ /> is the sound file it will play, if you add multiple sound files, it will play the sounds randomly.
- 
  
 <​**PROPERTIES** > Are all the options you may use to decide how the sound will behave in-game, like **MinDistance** is what distance you have to be in to hear it, since 1 is the players exact size, You will hear the sound perfectly if you stand on it. Beyond that, you will be able to hear the sound until the distance specified in **MaxDistance**,​ I don't know exactly but I think that "​1"​ distance is a meter, excuse me if i'm wrong :). (Probably an inch, a person 1 meter in width? **Needs to be confirmed**) <​**PROPERTIES** > Are all the options you may use to decide how the sound will behave in-game, like **MinDistance** is what distance you have to be in to hear it, since 1 is the players exact size, You will hear the sound perfectly if you stand on it. Beyond that, you will be able to hear the sound until the distance specified in **MaxDistance**,​ I don't know exactly but I think that "​1"​ distance is a meter, excuse me if i'm wrong :). (Probably an inch, a person 1 meter in width? **Needs to be confirmed**)
- 
  
 Well thats it! You now created your very own sound! Use it with PlaySoundAtEntity(syntax) in your custom level-script;​ (check [[http://​wiki.frictionalgames.com/​hpl2/​amnesia/​script_functions|Engine scripts]] to know what syntax to use) Well thats it! You now created your very own sound! Use it with PlaySoundAtEntity(syntax) in your custom level-script;​ (check [[http://​wiki.frictionalgames.com/​hpl2/​amnesia/​script_functions|Engine scripts]] to know what syntax to use)
- 
  
 ====== Custom Music ====== ====== Custom Music ======
hpl2/tutorials/script/page.txt · Last modified: 2014/11/01 22:22 by romulator