Event when game graphics first show

When I load my map (which is pretty big), I start hearing noise from my AmbientSound nodes, prior to the screen switching from my loading view to the game graphics.

Is there any event that exists in script to detect when the game is first fully loaded and displaying graphics? This is because I want to prevent ambient sound playing until the player is in the game.

I supposse you already have tried in Kismet with a “Level loaded -> Loaded and Visible”, and then a “console command” node.

@CobaltUDK No i haven’t (i barely ever touch kismet to be honest). But this certainly sounds like what I’m after. I’ll check it out. Thanks!

Edit: Any idea if this is accessible via script?

I’ve test the kismet node and it still plays before the player view is displayed.

Your sounds are set to autoplay right? Maybe turn them off and when the level is loaded in kismet there is a node or two which you can use to start playing the sounds again.(but it may become tedious as if you have a lot of sounds you will have to hook them manually. I have the feeling there was a node or a node setting in the sound editor that was strictly for that timing before the game starts.I cant remember correctly and I know its not on UDN but a search on the archived forums should find a similar solution. I will try to remember what it was.

@O_and_N The main problem is knowing when the game has started displaying. The sound is easy to control because i can just set master volume to zero until i know the game has loaded. It’s just knowing when that point is that I’m having trouble with.

But if you can find that node, that should help a lot.

Stupid to ask from my part, but did you also tried the player spawned kismet? Or maybe force it first by comparing bools to check if the player is spawned or not and after that fire the kismet?(not my best thinking today,sorry )

By the way, are you using level streaming ?

No, i’m not using level steaming.

As a bit o an update; I’ve noticed that in GameViewportClient.uc PostRender() gets called at the point at which the graphics start displaying:



/**
 * Called after rendering the player views and HUDs to render menus, the console, etc.
 * This is the last rendering call in the render loop
 * @param Canvas - The canvas to use for rendering.
 */
event PostRender(Canvas Canvas)
{
    ...
}


However this class only gets instanced once per game session (doesn’t get re-instanced when loading levels). So it’s possible to fire an event for the first time this gets called per level load. Seems a bit of a hack, but this is the best I’ve managed t come up with so far.

I’d still welcome any better options.