func_rain

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
SilentAngel
Captain
Posts: 239
Joined: Wed Mar 12, 2008 8:27 pm

func_rain

Post by SilentAngel »

is possible fo use func_rain in scripting, because I would put some rain ai a stock map...
I don't know how func_rain works, so I tried some ways but don't get it to work! :?
$oldier Of Ra
Lieutenant Colonel
Posts: 404
Joined: Sun Oct 16, 2005 7:16 pm
Location: Belgium
Contact:

Post by $oldier Of Ra »

Yes, however there are 2 downsides:
- Rain is very laggy; scripted or through radiant
- Through scripting, your rain will fall through roofs, floors etc...

Place this in your script and thread it. You may also need to exec global/weather.scr.

Code: Select all

rain:
spawn script_model "targetname" "weatherF" "classname" "func_rain" "origin" "( 1 1 1 )" "angle" "0"
$weatherF setsize ( -6000 -6000 -1000) ( 6000 6000 6000)
$weatherF notsolid
$weatherF show

spawn script_model "targetname" "weatherR" "classname" "func_rain" "origin" "( 1 1 1 )" "angle" "0"
$weatherR setsize ( -6000 -6000 -1000) ( 6000 6000 6000)
$weatherR notsolid
$weatherR show

spawn script_model "targetname" "weatherW" "classname" "func_rain" "origin" "( 1 1 1 )" "angle" "0"
$weatherW setsize ( -6000 -6000 -1000) ( 6000 6000 6000)
$weatherW notsolid
$weatherW show

spawn script_model "targetname" "weatherI" "classname" "func_rain" "origin" "( 1 1 1 )" "angle" "0"
$weatherI setsize ( -6000 -6000 -1000) ( 6000 6000 6000)
$weatherI notsolid
$weatherI show
end
Our official website: http://www.mohaairborne.co.cc
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)

For all your bot needs!!!!

$oldier Of Ra.
SilentAngel
Captain
Posts: 239
Joined: Wed Mar 12, 2008 8:27 pm

Post by SilentAngel »

thanx bro.
okay, let see if I've understood:
this script apply the func_rain to a specified entity(targetname) isn't it?
so if it's it what does weatherF means and why the script is repeated 4 times?
$oldier Of Ra
Lieutenant Colonel
Posts: 404
Joined: Sun Oct 16, 2005 7:16 pm
Location: Belgium
Contact:

Post by $oldier Of Ra »

Huh? What specified entity would that be? :? I spawned multiple func_rain and given them targetnames, so I use those applied targetnames to continue adding some properties to the spawned func_rain. It's another way instead of using local, group or level vars.

4 of them thickens the rain like the one you know from the sniper mission etc (I think all SP missions with rain used 4). Use 1 or 2 if you like (I would recommend it because of the lag); also these specific targetnames get handled by the weather.scr

But I'll mention it again; your rain will fall through walls, roofs, ceilings etc... it'll look like crap, not to mention the lag.
Our official website: http://www.mohaairborne.co.cc
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)

For all your bot needs!!!!

$oldier Of Ra.
SilentAngel
Captain
Posts: 239
Joined: Wed Mar 12, 2008 8:27 pm

Post by SilentAngel »

it wouldn't if I spown it to cover only yhe outside...
it will give me some days of work because of the coords and sizes that I have to calculate to do this, but it will be good..isn't it?
$oldier Of Ra
Lieutenant Colonel
Posts: 404
Joined: Sun Oct 16, 2005 7:16 pm
Location: Belgium
Contact:

Post by $oldier Of Ra »

The more func_rain you spawn, the more the map will lag. Besides, how odd and unrealistic would it look to see it raining everywhere except over roofs? Because if you would have placed rain over a roof, then it would fall through it, wouldn't it :)?
It seems like you're stuck here. It is impossible to get proper rain without doing it in radiant. Either accept this or don't script func_rain.
Our official website: http://www.mohaairborne.co.cc
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)

For all your bot needs!!!!

$oldier Of Ra.
Post Reply