Advertisement
deluxghost

Untitled

Jun 4th, 2020
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. 1. first you need to create your custom vsnd and vsndevts files according to the guide, and make sure your sounds work in game (tools mode)
  2.  
  3. 2. create such directory structure: Half-Life Alyx\game\hlvr_addons\<your_addon_name>\scripts\vscripts
  4.  
  5. KEEP IN MIND: it's **game\hlvr_addons** not content\hlvr_addons
  6.  
  7. 3. enter the vscripts, create a file with name "precache.lua" (or whatever name you want, but with ".lua" suffix)
  8.  
  9. 4. open the file, enter such code (exclude the equal sign lines):
  10.  
  11. =============
  12. function Precache(context)
  13. PrecacheResource("soundfile", "soundevents/<your_soundevents_file>.vsndevts", context)
  14. end
  15. =============
  16.  
  17. if you have more than one event files, use more PrecacheResource lines
  18.  
  19. vsnd files don't need to be preached
  20.  
  21. 5. open hammer, choose an entity that will spawn at map start (for example a logic_auto)
  22.  
  23. 6. change its "Entity Scripts" property (under "Misc") to "precache.lua" (or the name you selected in step 3)
  24.  
  25. 7. compile map, upload to workshop, test your published version
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement