Jump to content

Blacking out the player's screen


Korodic

Recommended Posts

I'm looking for a way to turn the player's screen black, until I want it to turn off, so no duration as durations could prove to be inaccurate on slower machines.

 

I figure the best way to do so would be through and image modifier, but I have gave it a shot with no luck, can someone walk me through this?

 

My logic looks like this...

 

Fade out (http://www.creationkit.com/FadeOutGame_-_Game) -> apply modifier for black screen (http://www.creationkit.com/Apply_-_ImageSpaceModifier) -> do other code stuff we don't want the player to see -> Remove modifier (http://www.creationkit.com/Remove_-_ImageSpaceModifier) -> fade in game from black (http://www.creationkit.com/FadeOutGame_-_Game)...

Link to comment
Share on other sites

OK, try adding the following two functions to your script, then call each one to fade in or fade out when you need it.

I haven't tried compiling or testing this, but it is based on code in the C03RampageQuest.psc script.

 

 

 

Scriptname FadeInOutBlack extends Quest
;**************************************

ImageSpaceModifier Property FadeToBlack auto
ImageSpaceModifier Property HoldBlack auto
ImageSpaceModifier Property FadeFromBlack auto

;**************************************

Function DoFadeOut() ; Black you out, disable player controls

FadeToBlack.Apply()
Utility.Wait(3)
FadeToBlack.PopTo(HoldBlack)
Game.DisablePlayerControls(abMovement = false, abFighting = false, abCamSwitch = true, abMenu = false, abActivate = false, abJournalTabs = false, aiDisablePOVType = 1)

EndFunction

;**************************************

Function DoFadeIn() ; Fade back in, enable player controls

HoldBlack.PopTo(FadeFromBlack)
HoldBlack.Remove()
Utility.Wait(3)
FadeFromBlack.Remove()
Game.EnablePlayerControls(abMovement = false, abFighting = false, abCamSwitch = true, abLooking = false, abSneaking = false, abMenu = false, abActivate = false, abJournalTabs = false, aiDisablePOVType = 1)

EndFunction

;**************************************

 

Edited by steve40
Link to comment
Share on other sites

 

No that's a timer which he doesn't want. What he wants is imod fadetoblack like steve40 said above.

A good example to use is the CarriageSystemScript:

 

FadeToBlackImod.Apply()

FadeToBlackImod.PopTo(FadeToBlackHoldImod)

 

FadeToBlackHoldImod.PopTo(FadeToBlackBackImod)

FadeToBlackHoldImod.Remove()

Edited by DizzasterJuice
Link to comment
Share on other sites

Looking through all the source scripts in the CK, there is only one instance where Bethesda has used FadeOutGame (in QF_MQ101_0003372B.psc, which is at the beginning of a new game where you choose your character's race). In ALL other scripts where a fadeout is required, Bethesda has opted to use an imod instead. In fact, one other script (carriageSystemScript.psc) has the FadeOutGame line commented out and replaced with the imod. There must be a good reason for this, huh? :wink:
Link to comment
Share on other sites

Well I suggested contacting DJ about this question and DJ is here... Feel like I am being stalked now lol But i know it was just timing. I only made the suggestion because the fade in and out in the mod worked exactly like Korodic wanted with no timer.
Link to comment
Share on other sites

I really appreciate the help guys ^.^

 

Kudos all 'round (if you already didn't get it from me).

 

~Korodic

 

EDIT: Seems like every time I try to give any of you guys kudos I get a 502 Error (Bad Gateway)

 

Probably apart of Dark0ne's efforts to update the sites. I'll give 'em to ya when I try again later at some point ;D

Link to comment
Share on other sites

  • Recently Browsing   0 members

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