Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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. create such directory structure: Half-Life Alyx\game\hlvr_addons\<your_addon_name>\scripts\vscripts
- KEEP IN MIND: it's **game\hlvr_addons** not content\hlvr_addons
- 3. enter the vscripts, create a file with name "precache.lua" (or whatever name you want, but with ".lua" suffix)
- 4. open the file, enter such code (exclude the equal sign lines):
- =============
- function Precache(context)
- PrecacheResource("soundfile", "soundevents/<your_soundevents_file>.vsndevts", context)
- end
- =============
- if you have more than one event files, use more PrecacheResource lines
- vsnd files don't need to be preached
- 5. open hammer, choose an entity that will spawn at map start (for example a logic_auto)
- 6. change its "Entity Scripts" property (under "Misc") to "precache.lua" (or the name you selected in step 3)
- 7. compile map, upload to workshop, test your published version
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement