Post tutorial RSS Level Editing Scripting by Prospero. Part. 12

How to set sun, water and the sounds of textures. If you would like this in your map it is eeeeeeeeeze.

Posted by on - Basic Client Side Coding

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 file add:

python code:

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 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:

python code:
pool1= Bladex.CreateEntity("Pool1","Entity Water",-7000,500,43000)
pool1.Color=0,0,0 #red,green,blue

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


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 ''. 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

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.

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.