Getting [b]func_rain[/b] to work.

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
Angex
Major
Posts: 293
Joined: Mon Dec 30, 2002 1:23 pm
Contact:

Getting [b]func_rain[/b] to work.

Post by Angex »

For some reason I'm having trouble getting rain to work. I made a simple square room, added a brush covering the entire area, textured it with common/rain . Pressed N while selected double clicked func_rain. Then complied the map.

My script looks like this:

main:
exec global/weather.scr
exec global/loadout.scr "maps/test_sky.scr"

level waittill prespawn
exec global/ambient.scr test_sky

level waittill spawn

//GIVE PLAYER WEAPON
$player item weapons/thompsonsmg.tik
$player ammo smg 30
$player useweaponclass smg
end


The strange part is that all the sounds work, i.e. rain, wind, thunder, but I don't see any rain, and the lightning flash is a blue colour.
Innkeeper
Colonel
Posts: 475
Joined: Mon Nov 25, 2002 10:13 pm
Location: NC, USA (about 7.5 klicks from the capital dome)
Contact:

Post by Innkeeper »

Actually the lightning flash is white, must be a video problem.

Does the brush enclose everything, top to bottom? also how large is this room?
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Make sure you've checked 'weather effects' in the video options :wink:
Image
Innkeeper
Colonel
Posts: 475
Joined: Mon Nov 25, 2002 10:13 pm
Location: NC, USA (about 7.5 klicks from the capital dome)
Contact:

Post by Innkeeper »

:oops: yea that really helps. :?
Angex
Major
Posts: 293
Joined: Mon Dec 30, 2002 1:23 pm
Contact:

Post by Angex »

Its not a video card problem, and I have "weather effects", it works fine when I play the original levels which include rain.

The room is about 512x512x512, it was just as a test, I left a slight gap between the rain brush an the room edges. Would that cause a problem ? I thought I might get a leak otherwise.
Innkeeper
Colonel
Posts: 475
Joined: Mon Nov 25, 2002 10:13 pm
Location: NC, USA (about 7.5 klicks from the capital dome)
Contact:

Post by Innkeeper »

You might want to try something a little larger. There is a varible named rain_min_dist that does strange things from time to time. 'weather.scr' sets it to 512, a poor choice if you ask me.

If you want to add just rain and no lightning, it is best to add to you script (or create a custom script) and initilize the varibles by hand. This is also how you create snow:

Code: Select all

   	level.rain_speed        = "32"
	   level.rain_speed_vary   = "16"
   	level.rain_length       = "2"
	   level.rain_width        = "1"
   	level.rain_density      = ".8"
	   level.rain_slant        = "250"
   	level.rain_min_dist     = "1024"
	   level.rain_numshaders   = 12
   	level.rain_shader       = "textures/snow0"

The above values work ok for MOHAA but need to be different for Spearhead, especially the shader.
Angex
Major
Posts: 293
Joined: Mon Dec 30, 2002 1:23 pm
Contact:

Post by Angex »

YAY The forums back ! :D

Thanks for all the help, I'll try out all the suggested points. I've not spent much time with MoHAA maps while these forums have been missing, but I'll get back on it.
Post Reply