

const scriptsInEvents = {

	async Etransition_Event8_Act3(runtime, localVars)
	{
		runtime.callFunction(runtime.globalVars["TransitionTargetFunction"])
	},

	async Etransition_Event11_Act3(runtime, localVars)
	{
		runtime.callFunction(runtime.globalVars["TransitionTargetFunction"])
	},

	async Emain_Event32_Act3(runtime, localVars)
	{
		  const GCMain = runtime.objects.GCMain.getFirstInstance();
		        
		        if (!GCMain) {
		            console.error("GCMain instance not found");
		            return;
		        }
		
		        // Get the current level (replace with your actual level variable)
		        const currentLevel = GCMain.Level || 1; // Adjust based on your level variable
		        
		        // Submit the score
		        if (window.fillItAPI) {
		            window.fillItAPI.submitScoreIfNeeded(GCMain.Score, currentLevel);
		        } else {
		            console.error("fillItAPI not found");
		        }
		    
	}
};

globalThis.C3.JavaScriptInEvents = scriptsInEvents;
