Event OnGameFaded?

Post » Sun Jun 24, 2012 3:33 pm

i'm pulling my hair out trying to figure out how i can move the player to another cell once the FadeOutGame has finished.

the fadeout function does not wait until it is finished. it will fire the next line of code shortly after the fading has begun (it's not even immediately, it waits for a short time), and using Wait() is very unreliable and inaccurate

i need something that does the equivalent of a hypothetical Event OnGameFaded precisely when the screen has gone full black. any ideas?
User avatar
Joanne
 
Posts: 3357
Joined: Fri Oct 27, 2006 1:25 pm

Post » Sun Jun 24, 2012 10:41 am

Isn't there a timer based on true time, not game time?

What you are doing sounds like the same thing I'm needing to do with the opening scene of Lamplight.
User avatar
GabiiE Liiziiouz
 
Posts: 3360
Joined: Mon Jan 22, 2007 3:20 am

Post » Sun Jun 24, 2012 11:53 am

I have a similar thing ... I can't fix it either.

MoveTo (whichever version you try to use) seems to kick in as soon as FadeOut has started (and I can't find a way of making it wait ... other than wait a random time ... until the screen is properly gone).

In the end, I copped out and:
  • Remove Player Control
  • Start Player walking (away from encounter that just occurred)
  • Fade
  • Wait (5)
  • MoveTo


It sorta looks OK (it's on the not-finished-should-be-better List, though ;))
User avatar
SiLa
 
Posts: 3447
Joined: Tue Jun 13, 2006 7:52 am

Post » Sun Jun 24, 2012 1:37 pm

@fragginborn. i tried both Utility.Wait() and RegisterForSingleUpdate() both of which calculate real time not game time.... well, real-time papyrus style (all depends on resource available vs systems specs).

so my timing in seconds may look ok for me in testing if i increment it enough so that it sort of matches when i need it to fire, but theres no guarantee that it will fire exactly the same time for other users with different mods installed (looping scripts, continuously error-ing scripts, etc) and different machine specs

@h4vent - thats kinda how i have it set up now too, but the wait call seems very inaccurate and unreliable
User avatar
Samantha Jane Adams
 
Posts: 3433
Joined: Mon Dec 04, 2006 4:00 pm

Post » Sun Jun 24, 2012 8:04 am

Same. I have a cutscene that's timed to some fades and the entire thing just seems to fire off whenever the hell it feels like it... :P
User avatar
Rebecca Clare Smith
 
Posts: 3508
Joined: Fri Aug 04, 2006 4:13 pm

Post » Sun Jun 24, 2012 2:55 pm

If is not reliable to call wait AFTER FadeOutGame it might work better if you spawn a thread BEFORE calling it and put the moveTo in the new thread. You could do that by registering for an immediate update before fade and use the wait on the event or directly register for update with a time and the moveTo in the event. This should definitely work if the issue is inside the FadeOutGame function regarding how soon it will return from it....but maybe a bit more reliable in general, papyrus has so many wtfs.
Edit: Another idea if the issue is that the fade will expire before you move: try using two calls to fadeOut, one with your desired time corelated with the wait and another one with a longer time. If the game doesn't completely clear the fade effect before the second call I can see this helping you to ensure the image is faded out when you call moveTo.
User avatar
Richard Thompson
 
Posts: 3302
Joined: Mon Jun 04, 2007 3:49 am

Post » Sun Jun 24, 2012 7:54 am

Wow! It's not too often I see Amethyst asking a question. Definitely means it's something challenging. :)

Have you tried using an Image Space Modifier? There's a lot more control there. But as you said It's likely going to come down to how busy the Papyrus engine is when you call all this. In fact, FadeOutGame is probably just a wrapper around the ISM Engine.
User avatar
luke trodden
 
Posts: 3445
Joined: Sun Jun 24, 2007 12:48 am

Post » Sun Jun 24, 2012 2:47 pm

great suggestion aenara, i'll give it a look. i was looking into calling a forced weather change earlier, to fade out to an all black lighting model hahaha talk about overkill
User avatar
Shaylee Shaw
 
Posts: 3457
Joined: Wed Feb 21, 2007 8:55 pm

Post » Sun Jun 24, 2012 9:54 am

Yes, a simple image space modifier is the way to go. You can call it, then disable controls and then do whatever else you need. There already is one in vanilla. Easiest way to see them all is just download the directors tools.
User avatar
Eilidh Brian
 
Posts: 3504
Joined: Mon Jun 19, 2006 10:45 am


Return to V - Skyrim