I'm trying to load different level1 locator files (copies of 'art/missions/level01/level.p3d') based on a certain condition.
In example:
CustomFiles.ini
[PathHandlers] art\\missions\\level01\\level.p3d=Resources/level01/level01.lua
level01.lua
if SomeChoice == 1 then Game.LoadP3DFile("\\Mods\\" .. GetModName() .. "\\Resources\\level01\\custom.p3d"); else Game.LoadP3DFile("art\\missions\\level01\\level.p3d"); end
The game crashes on level load, with a ton of similar messages:
- Locator type 3 'level1_carstart' not found for 'InitLevelPlayerVehicle' command
- A crash occurred in the following script: scripts\missions\level01\leveli.mfk (line 5); Script command InitLevelPlayerVehicle, Arg list famil_v, level1_carstart, DEFAULT
The 'custom.p3d' is an exact copy of the original file (for now). I don't understand why it can't find the locator types.
I'm having some trouble understanding how it all works. I'm new to SHAR modding, but I'm quite, if I can say, an experienced programmer.
If anyone can give me an explanation or can point me to a more in-depth documentation or discussion on this topic.
Thanks