save and scene_map problem

Posted By: Anonymous

save and scene_map problem - 09/27/01 15:38

Here's the problem I've got with sky textures and save/load functions.

In the 'main' function I have init_sky() function (which sets cloud_map, sky_map, scene_map and so on) and I load a level1. Then I load another level2 and I have function init_sky_next_level(). When I save the second lavel2 (with the new sky set) and then I load it there's the sky from previous level? HOW COME? I tried to init_sky before load_level but it's only worked when I didn't init_sky in the main function.
Does anybody know what is wrong?

Greetings
AL

Posted By: Anonymous

Re: save and scene_map problem - 09/30/01 04:18

maybe you have to close the first sky, I do not know enough about wdl yet to tell you how to make init_sky=-null before you load the next sky for your second level.
Posted By: Anonymous

Re: save and scene_map problem - 10/01/01 09:51

Hi: If you send me the structure of the different wdl involved ( or is only one ? ), perhaps I can help you. For now, I can't understand the exact order in which you do the calls.
Posted By: Anonymous

Re: save and scene_map problem - 10/02/01 21:33

Hi I'll just try to make it more clear
Here's what I do:

//here I set the sky in the first level
function init_sky_in_first_level(){
scene_map = first_level_map;
//oher stuff...
}

//here I set the sky in the second level
function init_sky_in_second_level(){
scene_map = second_level_map;
//oher stuff...
}

function main{//'main' function...
//other stuff...
load_level(<first_level.wmb> );
init_sky_in_first_level();
//other stuff...
}

I run the game, the first level is loaded, and then during the game the second level is loaded

function load_second_level{
me=null;
load_level(<second_level.wmb> );
init_sky_in_second_level();
}

And the problem is that when I save the game at the second level and I load it afterwards I've got the wrong scene_map. (Eg. from a previous level.)

Greetings
AL

Posted By: James Snydstrup

Re: save and scene_map problem - 10/02/01 22:02

AndyEl:

You need to verify that 'function load_second_level' is actually being executed after the second level loads. If it is being executed then you can continue to troubleshoot the problem but that is the first thing you need to determine. One way to do that is to put in a BEEP or breakpoint.

© 2023 lite-C Forums