 |
 |
 |
|
 |
 |
 |
|
 |
 |
How to tell if it is raining |
|
1 2 3 | Next 10 events »| All Messages |
|
|
00:38:30 24 May 2012 |
|
Daemonion
All About Audio (Resident)
On forum: 09/27/2011
Messages: 567
|
How to tell if it is raining
For those who have been following my space restrictor thread, you know that I've used {=is_day} to trigger specific sounds in my restrictors.
Is there anything similar for rain? How can I ask the game if it is raining or not? My hope would be to trigger different audio when in a restrictor based on whether or not it is raining.
Thanks! |
02:28:07 24 May 2012 |
|
insanelazarez
Yeah, Good Luck With That... (Resident)
 On forum: 01/31/2009
Messages: 1070
|
---QUOTATION--- How to tell if it is raining
For those who have been following my space restrictor thread, you know that I've used {=is_day} to trigger specific sounds in my restrictors.
Is there anything similar for rain? How can I ask the game if it is raining or not? My hope would be to trigger different audio when in a restrictor based on whether or not it is raining.
Thanks! ---END QUOTATION---
Daemonion, instead of asking if it's raining... tell the game it's raining.
Create a weather file, with a 'default weather' structure and add the rain for the whole day. And use your space restrictor to call the new weather file.
Function in xr_effects
---QUOTATION---
function change_weather_now (actor, npc, p)
if p[1] then
level.set_weather (p[1])
end
end
---END QUOTATION---
Example in you space restrictor:
---QUOTATION---
[logic]
active = sr_idle@if_day_rain_otherwise_not_rain
[sr_idle@if_day_rain_otherwise_not_rain]
on_info = {=is_day} sr_idle@day_rain
on_info2 = {!is_day} sr_idle@night_not_rain
[sr_idle@day_rain]
on_timer = 3333 | sr_idle@whatever %=change_weather_now(name_of_weather_raining)%
[sr_idle@night_not_rain]
on_timer = 3333 | sr_idle@whatever %=change_weather_now(default)%
[sr_idle@whatever]
on_timer = 3333 | sr_idle@if_day_rain_otherwise_not_rain
---END QUOTATION---
But if you save the game and reload... the game needs time to call the new section like 6 seconds or something.
You dont need to check if is day. Call a info for example, right?
It was just an idea. The limitations are obvious. But the function works, cause i'm using it.
Something like this:
---QUOTATION---
%=change_weather_now(yantar)%
---END QUOTATION---
And voila... yantar weather. But again... if you save/reload... the new weather is gone. Because the game restores the normal weather section for that specific map.
We could add a function in bind stalker. But the result would be bad cause of the lag. Imagine the game checking/and changing the weather every 5 milisecs... lol. What a mess.
Well, a good scripter can use the bind stalker approach... i don't know... some timer right? But in this case you dont need space restrictors, right?
"Between you and us, that thing that killed you is a total dick. Please disregard this message if you committed suicide."
http://www.moddb.com/members/insanelazarez/videos/stalker-mutant-zone-tribute#imagebox
http://moddercove.blogspot.com/2011/05/x-ray-engine-e-ia-quello-che-non.html
Diary of a modder:
http://s693.photobucket.com/albums/vv297/insanelazarez/Diary%20of%20a%20Modder/
So, i dare to assume your time machine is better than my time machine, huh? Stupid dog.
Ahh, my old youtube account, check this one out:
http://www.youtube.com/watch?v=1Fu2oyn1Eps
|
03:32:25 24 May 2012 |
|
Daemonion
All About Audio (Resident)
On forum: 09/27/2011
Messages: 567
|
---QUOTATION--- Daemonion, instead of asking if it's raining... tell the game it's raining. ---END QUOTATION---
lol, that sounds like something Morpheus would say
Well, I don't want to make it rain, actually.
It ties into what I was doing earlier with the space restrictors. Player walks into a house, and an "interior ambient" sound plays. Same idea, except, now, I was wondering if I could have two different "interior ambient" sounds - one for when it is raining, and one for when it is not raining.
Actor walks into space restrictor (say, some_house_in_cordon).
it is raining, so play interior_ambient_rain.ogg
or
it is not raining, so play interior_ambient_no_rain.ogg
Like that. |
11:47:00 24 May 2012 |
|
Daemonion
All About Audio (Resident)
On forum: 09/27/2011
Messages: 567
|
---QUOTATION--- Cool idea you're having
I don't have any experience with space restrictors or other all.spawn related stuff because I consider it work of the devil
Just kidding. You can request whether it's raining and also how intensely by script. However I don't know of a simple function. What I did for my dynamic wet surfaces is parse the current weather to get the rain_density value. If you like I could send you an excerpt of my script (don't wanna make it public yet because it's not finished). ---END QUOTATION---
That would be great, please do! |
14:39:33 24 May 2012 |
|
{imperialreign}
Звуковой Шаман (Resident)
 On forum: 10/29/2008
Messages: 3075
|
Aside from earlier ideas . . . only thing I could think of is a little hack & slash . . .
That is, go through the weather config(s) and determine which weather hours are considered "rain" - then write a function that uses a shit-load of conditionals to check if it's a raining weather hour or not, based on the current weather config . . . from there, it could give or take a new i_p . . . which in turn you could use to change the sound being played in the logic controls . . . it's a little brute force, though, lol
If you're using nandersen's dynamic weather engine, it might be easier to create a new function within the control script that monitors the current weather config, and current game hour for the info portion.
I'm not 100% sure if there's a way to actually parse specific parameters of the current weather hour while the game is running, to look for specific values (i.e. if rain_density != 0). Especially considering that the weather config values are constantly changing between weather hours . . . You might want to consider searching key terms in the lua_help.txt to see if you turn up anything intersting.
BTW - I got your email, just haven't had a chance to get around to looking things over yet, I've been rather busy recently, lol
{Frozen Sky mod for Shadow of Chernobyl - WIP}
http://www.moddb.com/mods/frozen-sky
{SoC Ambient Audio Overhaul feedback thread}
https://www.gsc-game.com/index.php?t=community&s=forums&s_game_type=xr&thm_page=1&thm_id=16655&sec_id=16
{CS Ambient Audio Overhaul feedback thread}
https://www.gsc-game.com/index.php?t=community&s=forums&s_game_type=xr2&thm_page=1&thm_id=19653&sec_id=22
{CoP Ambient Audio Overhaul thread}
https://gsc-game.com/index.php?t=community&s=forums&s_game_type=xr3&thm_page=1&thm_id=704&sec_id=18
FRIENDLY ZOMBIE
http://www.youtube.com/watch?v=fY824sqVSfA
WE'RE NOT MUTATION, WE ARE EVOLUTION.
|
17:43:37 28 May 2012 |
|
FatalFunnel
(Senior) On forum: 11/07/2011
Messages: 133
|
You know, it would be cool if we could come up with a system that has weather directly affect the actor, stuff like simulated temperature, and having individual suits tied into it. Things like some suits having waterproof properties, and having rain affect them less in a negative way, or some things being more insulated.
Basically I'm thinking of a system that adds simulated cold, something that makes weather more than just aesthetic. |
20:22:40 28 May 2012 |
|
Daemonion
All About Audio (Resident)
On forum: 09/27/2011
Messages: 567
|
---QUOTATION--- Can't you just use level.rain_factor() function?
It returns the current strength of rain in 0 to 1 value. You can even differentiate the sounds if it is heavy rain or the light one. ---END QUOTATION---
Hm, sounds interesting.
Can you tell me more about this? |
|
1 2 3 | Next 10 events »| All Messages |
|
|
|
» » |
|
All short dates are in Month-Day-Year format. |
 |
|
 |
|
|
|
 |
 |
 |