Updated July 21, 2005
HOME PAGE > AUTHORS > PROSPERO > BOD PYTHON SCRIPTING (02)
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 cfg.py file
import os
try:
os.remove("..\\..\\Maps\\MyMap\\pak\\BODPak.dat)
os.remove("..\\..\\Maps\\MyMap\\pak\\pf.dat")
except:
pass
import MemPersistence
try:
Bladex.DeleteStringValue("MainChar")
props=MemPersistence.Get("MainChar")
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
except:
pass