I am trying to implement code involving functions to update the map engine and a render function in the animation loop but I am running into problems. If I put MapEngine("DoubleEmpty.rmp", 60); in the game() function of main.js file, I get SPHERE ENGINE HAS STOPPED WORKING and a problem event named BEX or APPCRASH. If I comment out the MapEngine line in the main.js file and turn on the same command in an intro function in a cutscene file, I get MAP ENGINE FAILED! MAP ENGINE IS ALREADY
RUNNING. If I comment out that command in the cutscene file I get RENDERMAP() failed! MAP ENGINE called when MAP ENGINE was not
running. I am using 5 files from Radnen's Knights Tale and the Wait function in the Animate.js file and admittedly, I don't really know in detail how they work to create the textbox and fade text and objects. The textbox function has an 'if map engine is running condition'. Maybe I just need to add an IF MAP ENGINE is running condition?
RequireScript('Animate.js'); // I am only using the WAIT function in this file to show the map for a specified time period
RequireScript('cutscene1.js'); // This file contains my function for an animation.
I have another version of this game file with these same 9 files and a naive linear animation function that works fine. What did I change that is causing me such aggravation? The MapEngine function is in the game() function in the main.js file.
FORGET ALL THAT! I figured it out! The problem was caused by using the map to create new tiles which were then causing the map to not load because they were invalid tile references.DaVince edit - added code tags