SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH5 Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=249)
-   -   Playing Sounds by scripting in Phyton (https://www.subsim.com/radioroom/showthread.php?t=185925)

DrJones 07-23-11 02:46 PM

Playing Sounds by scripting in Phyton
 
Hey @ All

I think I found a way to play Sounds by scripting in Phyton in the SH5 Scripts:

This is a small example how to use it in the script

from System.Media import SoundPlayer
sp = SoundPlayer()
sp.SoundLocation = "C:\Ubisoft\Silent Hunter 5\data\Sound\Torpedo tube opening.wav"
sp.Play()

Best Regards

DrJones:salute:

Stormfly 07-23-11 02:53 PM

nice found ! :up:

Stormfly 07-23-11 03:50 PM

seams we need a path variable for it...


All times are GMT -5. The time now is 02:50 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.