Sounds at Night

Post » Sun Jan 19, 2014 2:49 pm

Hi there.

I'm trying to make it so that certain sounds only play between 10PM and 6AM. I have the Sound Descriptor and Sound Markers set up, and the sound has two conditions set as...

Target Function Name Function Info Comp Value

S GetCurrentTime None < 6.00 AND

S GetCurrentTime None >= 22.00 AND

Unfortunately, the new sounds doesn't appear to play between those sounds only.

Any help would be appreciated.

User avatar
(G-yen)
 
Posts: 3385
Joined: Thu Oct 11, 2007 11:10 pm

Post » Sun Jan 19, 2014 10:27 am

This is a common mistake that people make with time conditions. (Including myself long ago)

While you see days and time as succeeding events, the game engine does not. As such, your conditions are telling the sound to play when it is both later than 22, AND earlier than 6. This is an issue as the game sees days as a value between 0 and 24. Thus when it's 3am, while the way we conceptualize it means it is technically after 22, the game engine only thinks 22-24 are after 22. Thus it fails.

Simple solution; make the condition an OR instead. Then it will be before 6 OR after 22. Meaning only 22-24, and 0-6 are valid times, which I believe is what you want.

User avatar
Lance Vannortwick
 
Posts: 3479
Joined: Thu Sep 27, 2007 5:30 pm

Post » Sun Jan 19, 2014 4:22 am

Thanks, I'll have a look at it soon.

User avatar
Gill Mackin
 
Posts: 3384
Joined: Sat Dec 16, 2006 9:58 pm


Return to V - Skyrim