Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (1 invisible), 672 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 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