Jump to content

Recommended Posts

I'm attempting to load an .ogv file and play it in DST

However instead my game just freezes with black screen and im unable to make it work.

 

 

do
    local GLOBAL = GLOBAL
    local modEnv = GLOBAL.getfenv(1)
    local rawget, setmetatable = GLOBAL.rawget, GLOBAL.setmetatable
    setmetatable(modEnv, {
        __index = function(self, index)
            return rawget(GLOBAL, index)
        end,
        -- lack of __newindex means it defaults to modEnv, so we don't mess up globals.
    })
 
    _G = GLOBAL
end



 
Assets =
 
{
 
    Asset("FILE", "movies/rotn_loop.ogv"),
 
}




 
AddClassPostConstruct("screens/redux/mainscreen", function(self, ...)
 
    local vid = resolvefilepath("movies/rotn_loop.mp4")
 
    self.inst:DoTaskInTime(0, function()
        TheFrontEnd:Fade(FADE_OUT, SCREEN_FADE_TIME, function()
            TheFrontEnd:PushScreen(MovieDialog(vid, OnMovieDone))
            TheFrontEnd:Fade(FADE_IN, SCREEN_FADE_TIME)
            self:Hide()
        end)


 
    end)
end)
Link to comment
https://forums.kleientertainment.com/forums/topic/157454-moviedialog-help/
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...