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? |