Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, SBGuy, TipmyPip, ozgur), 923 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Is it possible to determine that the video is complete? #483895
08/11/21 15:07
08/11/21 15:07
Joined: Jan 2012
Posts: 108
G
gamers Offline OP
Member
gamers  Offline OP
Member
G

Joined: Jan 2012
Posts: 108
Hello there,

I'm trying to understand whether the video is complete with the code I shared below, but it doesn't work as I want. I could not determine where I made a mistake. Please could you help me?

The code:



Code
if(media_playing(EoL_video)==1) 
	{
		reset(EoL_video_panel,SHOW);
		wait (1);
	
	}
	else
	{
		set(EoL_video_panel,SHOW);
	}

Re: Is it possible to determine that the video is complete? [Re: gamers] #483935
08/15/21 17:31
08/15/21 17:31
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Hey! Use handles and 'media_playing' for that.
Something like this:
Code
void play_media()
{
	var handle = media_play(...)
	while(media_playing(handle))
	{
		wait(1);
	}
}


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Is it possible to determine that the video is complete? [Re: 3run] #483938
08/16/21 11:39
08/16/21 11:39
Joined: Jan 2012
Posts: 108
G
gamers Offline OP
Member
gamers  Offline OP
Member
G

Joined: Jan 2012
Posts: 108
Hi 3run,
Thank you very much!

Best regards,

Originally Posted by 3run
Hey! Use handles and 'media_playing' for that.
Something like this:
Code
void play_media()
{
	var handle = media_play(...)
	while(media_playing(handle))
	{
		wait(1);
	}
}

Re: Is it possible to determine that the video is complete? [Re: gamers] #484001
08/25/21 21:21
08/25/21 21:21
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,107
Germany
good media-command-example (except of media_playing^^):
https://opserver.de/ubb7/ubbthreads.php?ubb=showflat&Main=52675&Number=439158#Post439158

edit: Btw...running video-handles might crash engine on level_load. Not 100% sure about this, but i always stop all running media handles before switching levels.
While thinking about, iam pretty sure this was caused by a video i rendered to texture of a entity, then switched the level, crash.

greets

Last edited by rayp; 08/25/21 21:30.

Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1