Tut12. Sun, Water, Footsteps.
You will have noticed on some maps the sun is visible and casts nice rays. If you would like this in your map it is eeeeeeeeeze.
In your DefFuncs.py file add:
I have no idea what the first arg, 1 is for so just leave it as 1 and forget it. The last 3 args should match the settings of the External light in the LED. The position of the sunflare will then be consistant with all the cast shadows. btw. In the RAS maps the sun is created in a file sol.py. For some reason the sunflare is not saved in memory like all the entities and is absent in the saved games. If you put the code in DefFuncs it will be recreated as the savegame loads. The sunflare is optional. It is purely cosmetic and does not emit light.
Water is easy enough. You just have to be careful with your coords to avoid floods. In the LED, move cursor to where you want a pool. Note X and Y readings. You need a 'seed point' which can be anywhere within where you want a wet bit. The water will flow out in the manner
of real water (watch for leaks. ) The critical part is the Z reading as this sets the water level. Make sure it doesn't overflow or it can be very embarassing. The code is:
Tweak the Color (0 to 255) and Reflection (0 to 1) to your preference.
If you have a lot of pools, you can make a seperate file, or you can put the pools in objs.py.
This is a very cool feature of the game that allows you to assign different footstep sounds to various textures. Also, it affects the sound made when a surface is hit. (Arrows hit snow with nice crunch.)
Make a file 'TextureMaterials.py'. This is a Key file and must have that exact name. Shortcut here: Copy this file intact from one of the RAS maps and Paste it into your own map. If you using a texture set from a particular map, grab the one from that map. You need not edit it then.
Exec it in cfg.py.
Useful tip. Keep this file at the end of the execs so it is loaded last. If you have footstep sounds when the map is loaded, you then know that there are no errors in the other files.