ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
How to tell if it is raining

« Previous 10 events | 1 2 3 | All Messages
Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  09:36:28  23 June 2012
profilee-mailreply Message URLTo the Top
Daemonion
All About Audio
(Resident)

 

 
On forum: 09/27/2011
Messages: 567

---QUOTATION---
I was thinking that you might not even need to use an info_portion, Daemonion. Info_portions are nice because they are flags that survive save/reloads and level transitions, but they can be a bit "heavy". Your update() code can set a global boolean variable like is_raining, and that can be checked directly. Or the {+its_raining} could be replaced by {=is_raining} where is_raining() is an xr_conditions.script helper function that simply returns level.rain_factor() > 0.07.

While looking in xr_sound.script to check a hypothesis -- that the game's weather processing is occurring before the sound stuff, which might be executing a function like xr_sound.stop_all_sound_object() -- I checked on the lua_help.script sound stuff for sound_object. This class has a volume property. Object instances of this class are returned by xr_sound.get_safe_sound_object(path). If that property is a true property (that is, you can both get and set the volume), then you might have a way to control the fade on sounds.
---END QUOTATION---


How did you know that class has a volume property?
  13:40:24  23 June 2012
profilee-mailreply Message URLTo the Top
mnn
Senior Resident
 

 
On forum: 06/12/2009
Messages: 2694
Daemonion: Hmm, he checked lua_help.script?
 
Each word should be at least 3 characters long.
Search:    
Search conditions:    - spaces as AND    - spaces as OR   
 
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
 

All short dates are in Month-Day-Year format.


 

Copyright © 1995-2021 GSC Game World. All rights reserved.
This site is best viewed in Internet Explorer 4.xx and up and Javascript enabled. Webmaster.
Opera Software products are not supported.
If any problem concerning the site functioning under Opera Software appears apply
to Opera Software technical support service.