Apparently there's more...
This is my map script:
#include "..\headers\define.h"
#include "..\headers\FLOFFICE.h"
#include "..\headers\updatmap.h"
#define NAME SCRIPT_FLOFFICE
#include "..\headers\command.h"
procedure start;
procedure map_enter_p_proc;
procedure map_update_p_proc;
export variable generic_temp_box;
export variable po_luke_box_obj;
export variable luke_obj;
procedure start begin
end
procedure map_enter_p_proc begin
variable critter;
if ((global_var(GVAR_TALKED_KATHY) == 0) or (global_var(GVAR_HELP_KATHY) == 0)) then begin
Critter:=create_object_sid(PID_BOOTLEGGER_FEMALE,0,0,SCRIPT_FCMCUL3);
critter_attempt_placement(Critter,20308,0);
end
if (is_loading_game == false) then begin
if (map_first_run) then begin
display_msg(mstr(100));
end
end
if (elevation(dude_obj) == 0) then begin
Lighting;
end
else begin
Full_Light;
end
set_global_var(GVAR_LOAD_MAP_INDEX,0);
end
procedure map_update_p_proc begin
if (elevation(dude_obj) == 0) then begin
Lighting;
end
else begin
Full_Light;
end
end
It already contained GVAR_LOAD_MAP, I tinkered with it for a while (I also completely erased it) to no avail. I checked the spawned critter script, it didn't set the gvars on 1+, edited it, I also got rid of it... No luck.
In this current form the map behaves as follows:
First time I enter all is fine, I get the "first time enter" msg, the critter is spawned.
From the second time on: I get the "first time enter" msg, the critter is not spawned, Pc is spawned according to the start hex, not according the exit grid. After I enter the map some 1/4 more times then the game crashes.
It seems that somehow I replicated the well known Den bug of unofficial patch 1.4. Actually I already had such a problem with my artemple map (map entered for the first time many times), but it didn't crash the game. It also simply ceased to happen in a week or so, and never happened anymore. Do you see a mistake in my map script, or odds are there's something in another script?