Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Music Terminal
i3670 Offline
Posting Freak

Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation: 36
#1
Music Terminal

Okay so I'm trying to create a music playing terminal using the StationGui_AudioPlaybackApp. The text "OfficeTerminalFileName" shows up with the correct text so the script is functioning, except for the actual sound file. I suspect it doesn't support the format.

Is there another command that I can replace the AddAudioFile_Voice with that will play .snt/.ogg files? I've looked on the wiki, but I can't find anything concerning Depth_ImGui at all.



Script:
Spoiler below!


void MusicTerminal_OnGui(const tString&in asEntityName, float afTimeStep)
{
ImGui_SetTransCategory("Office_Text");

StationGuiBG_Backdrop();
StationGuiBG_Scanlines();

Depth_ImGui_AddAudioFile_Voice("OfficeTerminalFileName_"+i, "00_03_apartment1/amb/object/radio_show/music/radio_song_"+i);
StationGui_AudioPlaybackApp();
}


**Sorry for posting in quick succession, but I'm into modding again.**

"What you think is irrelevant" - A character of our time

A Christmas Hunt
04-10-2016, 12:50 AM
Find
Abion47 Offline
Senior Member

Posts: 369
Threads: 22
Joined: Oct 2015
Reputation: 46
#2
RE: Music Terminal

The vast majority of sound-playing functions that I can see are more or less hard-wired to work with FMOD sound banks. How are you trying to play the music track? (i.e. what format is the track stored in, where are you keeping it, etc.)
04-10-2016, 09:44 PM
Find
i3670 Offline
Posting Freak

Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation: 36
#3
RE: Music Terminal

I don't know, I suspect it's an .snt/.ogg which would mean it's somewhere in the sounds-folder (I pulled the source from inside the level_editor). Do you think I can make a normal StationGui_MainMenu(); and use the Sound_CreateAtEntity(); and bind it to the various Apps on screen? That is, if the first version doesn't work.

"What you think is irrelevant" - A character of our time

A Christmas Hunt
04-10-2016, 09:54 PM
Find
Abion47 Offline
Senior Member

Posts: 369
Threads: 22
Joined: Oct 2015
Reputation: 46
#4
RE: Music Terminal

Ok, it took me a little while, but I think I've got some of this figured out.

The function you are using ("Depth_ImGui_AddAudioFile_Voice") deals with voice sound sources, but the files you are specifying ("00_03_apartment1/amb/object/radio_show/music/radio_song_"+i) is a soundbank sound source instead. Soundbanks are used for sounds that do stuff like ambient noises or sound effects, but voice sounds are used for dialogue. The two aren't interchangeable, i.e. you can't use a soundbank file in a function designed for a voice file or vice versa.

If you want to play this music in some kind of a jukebox sense, you would need to use the Sound_CreateAtEntity/Sound_Play functions. I put together a page on the wiki regarding playing audio so you can figure out how exactly you want it all put together.
04-11-2016, 01:35 AM
Find
i3670 Offline
Posting Freak

Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation: 36
#5
RE: Music Terminal

Yes, I'm trying to create a jukebox. I got a working script for it. It's a bit clunky with multiple interactable areas that are active/inactive and depending on which the player interacts with either radio_song1/2/3/4/Off plays.

"What you think is irrelevant" - A character of our time

A Christmas Hunt
04-11-2016, 07:33 AM
Find




Users browsing this thread: 2 Guest(s)