Warning: include(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/snow.php on line 3

Warning: include(http://map.planetmedalofhonor.gamespy.com/mohaa/poll/poll_cookie.php): failed to open stream: no suitable wrapper could be found in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/snow.php on line 3

Warning: include(): Failed opening 'http://map.planetmedalofhonor.gamespy.com/mohaa/poll/poll_cookie.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/snow.php on line 3
.map :: Mapping for MoHAA

 
IRC :: #.map on Quakenet.org or simply go to irc://irc.quakenet.eu.org/.map
 

 
Warning: include(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/snow.php on line 57

Warning: include(http://map.planetmedalofhonor.gamespy.com/mohaa/leftindex.php): failed to open stream: no suitable wrapper could be found in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/snow.php on line 57

Warning: include(): Failed opening 'http://map.planetmedalofhonor.gamespy.com/mohaa/leftindex.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/snow.php on line 57
 
 

Snow :: Innkeeper
-------------------------------------------------------------------------------

This tutorial describes how to enable your winter time map with snow. This tutorial assumes that you have fundamental MohRadiant skills and know how to create a basic map. Be aware that adding rain or snow to your map can decrease the FPS dramatically.

-------------------------------------------------------------------------------
Step 1 : Working on the Map
-------------------------------------------------------------------------------

Lets start out by making a small map with an area to confine the player. The reason we want to confine the player is because it would look strange to get to the edge of the map and not see snow when looking at the horizon.Then we add a shelter to get under to keep snow from piling up on our head. The picture below may help to visually understand what I am talking about.

Once we have that done, lets create 4 brushes around our shed, leaving about 24 units away from the shed. Make the brushes so that they go from the sky to the ground. Now we need to select the rain texture as shown in the next pictures.


We want to have it snow above the shed but not in it, so we will create a brush to fill in the hole above the shed from the sky down to about 24 units above the shed.

Now with all 5 brushes selected we need to make them an entity of func_rain. To do this right click in the 2D window and select func->rain as shown in the following picture.

If you bring up the entity box by pressing 'N' you will see this.

There is nothing we need to add here.

That's about it for the map, now we need to work on the map's script.

-------------------------------------------------------------------------------
Step 2 : The Map's Script File
-------------------------------------------------------------------------------

The game engine in MOHAA and Spearhead function differently when it comes to rain, or snow in this case. It is the rain function that we need to control. So first we need to find out what version of the game we are playing. We can do that by getting the version string. This line can be anywhere in the script just as long as it is ahead of the "if" statement below.

local.string = getcvar(version)

If the version is 1.xx, it is MOHAA, and if it is 2.xx, it is Spearhead. The version number starts at the 25th position in the string. So we will setup the parameters based on the version that the game is using.

level waittill spawn

wait 2
// Setup snow parameters

if(local.string[25] == "2")
{
level.rain_speed = "60"
level.rain_speed_vary = "2"
level.rain_length = "2"
level.rain_width = "1"
level.rain_density = "5"
level.rain_slant = "1"
level.rain_min_dist = "768"
level.rain_numshaders = 12
level.rain_shader = "textures/snow"
}
else
{
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 = "768"
level.rain_numshaders = 12
level.rain_shader = "textures/snow0"
}

You can play with the parameters a bit to get just the effect you are looking for. If you change the slant parameter, you may need to have your brushes further than 24 units away from the shed so that snow does not come through part of the roof.

[ Download the Example Map ]

Need any help : Ask in the Forum

 

 


 
Warning: include(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/snow.php on line 230

Warning: include(http://map.planetmedalofhonor.gamespy.com/mohaa/rightindex.php): failed to open stream: no suitable wrapper could be found in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/snow.php on line 230

Warning: include(): Failed opening 'http://map.planetmedalofhonor.gamespy.com/mohaa/rightindex.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/snow.php on line 230


 


Warning: require(): open_basedir restriction in effect. File(/home/map/cgi-bin/mohaa/poll/include/config.inc.php) is not within the allowed path(s): (/var/www/vhosts/own3mall/mohaaaa.co.uk:/usr/share/php:/usr/share/pear) in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/snow.php on line 241

Warning: require(/home/map/cgi-bin/mohaa/poll/include/config.inc.php): failed to open stream: Operation not permitted in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/snow.php on line 241

Fatal error: require(): Failed opening required '/home/map/cgi-bin/mohaa/poll/include/config.inc.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/snow.php on line 241