Jump to content

FadeOut/In ISM problem


Recommended Posts

Hey guys, I've developed a sequence of ISMs that allow me to:

1.) FADEOUT - Fade from normal to black (animated, 3 sec duration)

2.) FADEHOLD - Black screen applied until FADEIN is called. (no animation)

3.) FADEIN - Fade from black to normal (animated, 3 sec duration)

This is all so the player can start a scripted sequence of events, sit in relative darkness which simulates the passage of time, and then have it fade back to normal once the script is all finished.

The problem is that the FADEOUT and FADEIN ISMs seem to fade to or from *white*, and I can't work out why. I know it's probably something really stupid, but could someone help me at all?

Here is a gallery showing the ISM data
The three ISMs are grouped in chronological order from left to right. The beginstate image shows the FIRST keyframes for each ISM, the Endstate image shows the LAST. This is so you can see what I'm fading from/to.

If it helps, here is the script used to control the ISMs:

    Scriptname SessineRLMoveWorkGearScript extends ObjectReference
    
    GlobalVariable property GameHour auto
    {The global for the current time in the game.}
    ObjectReference Property WorkbenchInitRef auto
    {Object reference for the initial workbench.}
    ObjectReference Property CraftingSuppliesInitRef auto
    {Object reference for the initial crafting supplies.}
    ObjectReference Property CartStaticRef auto
    {Object reference for the handcart static.}
    ObjectReference Property CartActivatorRef auto
    {Object reference for the handcart activator.}
    ObjectReference Property ScaffoldMainRef auto
    {Object reference for the main scaffold.}
    ObjectReference Property WorkbenchMainRef auto
    {Object reference for the main workbench.}
    ObjectReference Property CraftingSuppliesMainRef auto
    {Object reference for the main crafting supplies.}
    Message Property MoveWorkGearMessage01 auto
    {Message to be displayed on activate.}
    Message Property MoveWorkGearMessage02 auto
    {Message to be displayed on completion.}
    MiscObject property FirewoodItem auto
    {MiscItem reference for Firewood.}
    ImageSpaceModifier property    SessineISMFadeOut auto
    ImageSpaceModifier property    SessineISMFadeIn auto
    ImageSpaceModifier property    SessineISMFadeHold auto
    
    Event OnActivate(ObjectReference akActionRef)
        Int iButton = MoveWorkGearMessage01.show()
            If iButton == 0
                MoveGear()
            ElseIf iButton == 1
                return
            EndIf
    endEvent
    
    Function MoveGear()
        Game.DisablePlayerControls(true,false,false,false,false,false,true)
        Fadeout()
        WorkbenchInitRef.disable(true)
        CraftingSuppliesInitRef.disable(true)
        CartStaticRef.disable(true)
        float NewTime = GameHour.Mod(1.5)
        GameHour.SetValue(NewTime)
        ScaffoldMainRef.Enable(True)
        WorkbenchMainRef.Enable(True)
        CraftingSuppliesMainRef.Enable(True)
        EndMessage()        
    EndFunction
    
    Function EndMessage()
        Int iButton = MoveWorkGearMessage02.show()
            If iButton == 0
                Game.GetPlayer().additem(FirewoodItem,12,false)
                CartActivatorRef.disable()
                FadeIn()
                Game.EnablePlayerControls()
            ElseIf iButton == 1
                return
            EndIf
    EndFunction
    
    Function Fadeout()
    SessineISMFadeOut.Apply() ;fades to black
    Utility.Wait(2.5) ;the fade to black actually lasts 3 seconds, but I add the hold IMS early to prevent getting a flash of regular screen
    SessineISMFadeHold.Apply() ;holds blackendFunction
    EndFunction
    
    Function FadeIn()
    SessineISMFadeIn.Apply() ;fades back to normal
    SessineISMFadeHold.Remove() ;dont forget to remove the hold blackendFunction
    EndFunction

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...