I made some mistake here, and I wasn't able to find it yet.
But after the first video plays, the loop, that is suppose to play afterwards does not play.
Can anybody give me an hint why that is?

Code:
function handle_videos()
{
	while(1)
	{
		if(intro_played == 1)
		{
			intro_played = 0;
			var handle_intro_played = media_play("demo.ogg",NULL,100); 
			while(handle_intro_played){wait(1);}
			media_stop(handle_intro_played);
			wait(1);
			start_loop1 = 1;
		}
		if(start_loop1 == 1)
		{
			start_loop1 = 0;
			var handle_start_loop1 = media_loop("demo.ogg",NULL,100); 
		}
		wait(1);
	}	
}

///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////

function start_into()
{
	intro_played = 1;
	start_loop1 = 0;
	start_choice1 = 0;
	start_choice2 = 0;
	intro_room1 = 0;
	room1_loop1 = 0;
	room1_choice1 = 0;
	room1_choice2 = 0;
	room1_action_loop = 0;
	room1_action_loop_fail = 0;
	room1_action_loop_win = 0;
	room1_exit = 0;
	intro_room2 = 0;
	room2_loop2 = 0;
	room2_choice1 = 0;
	room2_choice2 = 0;
	room2_action_loop = 0;
	room2_action_loop_fail = 0;
	room2_action_loop_win = 0;
	room2_exit = 0;
	intro_room3 = 0;
	room3_loop1 = 0;
	room3_choice1 = 0;
	room3_choice2 = 0;
	room3_action_loop = 0;
	room3_action_loop_fail = 0;
	room3_action_loop_win = 0;
	room3_exit = 0;
	intro_room4 = 0;
	room4_loop1 = 0;
	room4_choice1 = 0;
	room4_choice2 = 0;
	room4_action_loop = 0;
	room4_action_loop_fail = 0;
	room4_action_loop_win = 0;
	room4_exit = 0;
	intro_room1 = 0;
	room5_loop1 = 0;
	room5_choice1 = 0;
	room5_choice2 = 0;
	room5_choice3 = 0;
	room5_choice4 = 0;
	room5_choice5 = 0;
	room5_action_loop1 = 0;
	room5_action_loop1_fail = 0;
	room5_action_loop2 = 0;
	room5_action_loop2_fail = 0;
	room5_action_loop3 = 0;
	room5_action_loop3_fail = 0;
	room5_action_loop4 = 0;
	room5_action_loop4_fail = 0;
	room5_exit = 0;
	wait(1);
	handle_videos();
}



"MAIN" starts the function "start_into()" and the into video plays once just fine, however, I couldn't manage to let another Video (in this case the loop) play afterwards.

If "start_loop1" is 1, then that loop is suppose to play etc.
I attempted to do this in "handle_videos()".

What did I do wrong?

Last edited by middleagechinese; 10/18/17 07:17.

Hello, it is me,

Middleagedchineseman!

Note: Not actually Chinese, nor middle age