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

Second Part of the tutorial, Stopping "Ice Skating".

Posted by on - Basic Client Side Coding

Tut2. Stopping 'Ice Skating'.

As you proceed to build your map in the LED and add new parts, you will eventually encounter the 'Ice Skating' syndrome where the Player will slide about when entering certain areas. This is because when the map is first loaded, certain info on the structure is compiled into files in a 'pak' folder which is created in the main map folder.
You need not pay any attention to this as it takes care of itself. However, this folder and files is only created if it does not exist and making changes to your map will confuse the engine if these files contain info about an earlier version of the *bw file. This folder should be removed everytime you recompile the map.

To achieve this, add this code to your file

python code:
import os


This will force an update of the files. When you have finished building the map structure, delete this code to save a bit of load time. Speaking of which, as you add to your map the load times will increase and you will find the loading bar will reach the end before the map has finished loading. To adjust this, look at your for the line:

python code:

Increase the value 333 (or whatever) as your load times increase. (It's mostly guesswork, and maps don't always take the same times to load.) You can make a Blade_progress.jpg if you like. use favorite graphics program and size to 640x480. Save in BODLoader\Maps\MyMap folder. They tend to appear lighter in the game than in graphics program so allow for this. BOD will look for a file of this name, but it will cause no probs if you don't have one. When the load bar reaches about halfway BOD will look for "BladeProgress2.jpg". Again, this is optional.

One more little thing I have found. If you are playing a RAS map and stop and load a custom map, you might find that the Player will maybe not be the one you were expecting. The Player from the RAS map will continue into the custom map at their current level and inventory. . Use this code before LoadBar code in to clear out current Player info:

python code:
import MemPersistence
    props[2]["Objects"]             = []
    props[2]["Weapons"]             = []
    props[2]["Shields"]             = []
    props[2]["Quivers"]             = []
    props[2]["Keys"]                = []
    props[2]["SpecialKeys"]         = []
    props[2]["Tablets"]             = []
    props[2]["InvLeft"]             = None
    props[2]["InvLeft2"]            = None
    props[2]["InvRight"]            = None
    props[2]["InvLeftBack"]         = None
    props[2]["InvRightBack"]        = None

more later.....

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.