Gamestudio Links
Zorro Links
Newest Posts
the company
by dabolong. 11/06/26 08:25
Removing outliers from files
by jcl. 11/04/26 10:30
[MED] Import from FBX (2010) missing!!!
by rayp. 11/03/26 14:33
What are you working on?
by rayp. 11/02/26 13:57
No connection to MT4
by JeyKey II. 10/29/26 09:34
Zorro plugin for Hyperliquid.xyz
by opm. 10/28/26 13:50
Icon "OP"
by JeyKey II. 10/27/26 07:03
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (EW_bytes, Quad), 15,225 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
dabolong, MaliceTheMaker, Haitao_Ren, JimSimons, julienp
19249 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,378
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,378
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,127
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,127
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 | 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