In this episode we will add an engine sound that is triggered through the engine start button in Vred!
This is the script you will need: (Copy only the code that works for your particular version)
#Vred 2024
sound = vrNodeService.findNode("Engine_sound")
filename = r"ADD_YOUR_FILE_PATH_HERE"
sound.setSoundFile(filename)
sound.start()
#Vred 2023
sound = findNode("Engine_sound")
filename = 'ADD_YOUR_FILE_PATH_HERE'
sound.setFieldString("soundFile", filename)
sound.setFieldBool("play", true)
Happy Vred-ing!
Follow me on LinkedIn:
https://www.linkedin.com/in/victorpm/