Advertisement
TechOFreak

Episode 7 Functions

Nov 19th, 2020
854
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.85 KB | None | 0 0
  1. //From my Amnesia Rebirth Tutorial Series
  2. //Episode 7 Basic Sounds
  3. //https://www.youtube.com/channel/UCHEzyhMw1EALBcJEKVJFmwA
  4. //-----------------------------------------------------------
  5.  
  6. //Example of creating a sound at an entity, only the first 3 values are required for this funtion to work (Note: The entity name can be "player")
  7. Sound_CreateAtEntity("Sound_TorchBurn", "level_entity_shared/fire/wall_torch/wall_torch_burn", "chair_1", 1.0f, true, 1.0f, -1.0f, -1.0f);
  8. //SoundName (String) - the name of this sound that can be refered to later in your script.
  9. //SoundFile (String)- Path to the sound file you want to play.
  10. //EntityName (String)- The entity name you want to play the sound at.
  11. //FadeInTime (float)- How many seconds should it take for the audio to reach max volume (0 for no fade).
  12. //SaveSound (bool)- Cache the sound file. Useful if you're going to play the sound multiple times in the level.
  13. //Volume (float)- Value between 0.0 and 1.0 to decide the volume of the audio.
  14. //MinDist (float)- Minimum distance the sound can be heard at, -1.0f for default.
  15. //MaxDist (float)- Maximum distance the sound can be heard at, -1.0f for default.
  16.  
  17.  
  18. //Example of playing a sound object that you have already placed in your level.
  19. Sound_Play("fire_sound_1", 1.0f);
  20. //SoundObjectName (String)- the name of the sound object as it appears in the level editor.
  21. //FadeInTime (float)- the volume that the sound should be played at.
  22.  
  23. //Example of stopping a sound that is playing, this can be a sound object in your level or a sound you created in your script.
  24. Sound_Stop("fire_sound_1", 1.0f);
  25. //SoundName (String)- the name of the sound object as it appears in the level editor or the name of the sound you assigned via the script file (ex. first variable in the Sound_CreateAtEntity function).
  26. //FadeInTime (float)- the volume that the sound should be played at.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement