TechOFreak

Episode 26 Functions

Jan 13th, 2021
703
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //From my Amnesia Rebirth Tutorial Series
  2. //Episode 26 Custom Sounds!
  3. //https://www.youtube.com/playlist?list=PL4KkjlmOwLwwMVqedCNpi6caUxhgyf8Qr
  4. //-----------------------------------------------------------
  5.  
  6. ///////////////////////////////////////
  7. // SNT Sound File Format
  8. // Create sound folder and add <Directory Path="/sounds" AddSubDirs="true"/> to your resources config file
  9. // Create a file and paste the below, save as a .snt file
  10. ///////////////////////////////////////
  11.  
  12. <SOUNDENTITY>
  13.  <SOUNDS>
  14.    <Main>
  15.       <Sound File="sound_name.ogg" />
  16.     </Main>
  17.    </SOUNDS>
  18.    <PROPERTIES Volume="100" MinDistance="1" MaxDistance="50" Random="0" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="False" Use3D="false" Blockable="False" BlockVolumeMul="0.7" Priority="5" />
  19. </SOUNDENTITY>
  20.  
  21. ///////////////////////////////////////
  22. // Sound Function
  23. ///////////////////////////////////////
  24.  
  25. //Play a sound at a specified entity (you can use "player" if desired)
  26. Sound_CreateAtEntity("sound_name", "sound_name.snt", "player", 0.0f, false, 1.0f, 1.0, 5.0);
  27. //SoundName (String)- name of the sound for referencing in your script.
  28. //SoundFileName (String)- path to .snt sound file (should include .snt in the name, Ex: your_sound.snt).
  29. //EntityName (String)- the name of the entity that this sound should be played at.
  30. //FadeInTime (float)- the amount of time should take for the sound to fully fade in.
  31. //SaveSound (bool)- should the sound be saved for later use.
  32. //Volume (float)- the volume of the specified audio (0.0 - 1.0 only).
  33. //MinDistance (float)- minimum distance at which the sound could be heard.
  34. //MaxDistance (float)- maximum distance at which the sound could be heard.
RAW Paste Data