Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
3 registered members (TedMar, AndrewAMD, fairtrader), 578 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
I NEED HELP (MEDIA_PLAY) #181024
01/31/08 00:20
01/31/08 00:20
Joined: Nov 2006
Posts: 497
Ohio
xbox Offline OP
Senior Member
xbox  Offline OP
Senior Member

Joined: Nov 2006
Posts: 497
Ohio
I am trying to play a video on a with no skins or anything at all, and i can't do it. Please help me. I looked in the help file did exactly what it said but it came up with an error at runtime saying "Parameter unknown media_play in {}". I can't figure this out. If you can't help me, then please lead me in the right direction PLEASE. My code is below.
Code:
 function play();
{
media_play ("linkin.mpg", bmap_for_entity(screen_mdl, 0), 100);
}

I called the function from the main().

Re: I NEED HELP (MEDIA_PLAY) [Re: xbox] #181025
01/31/08 01:55
01/31/08 01:55
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
First of all, Never touch a capslock button, and next time please think of a better, more describing title rather than "HELPPP PLEASEE".

Second, you might want to remove that semicolon (;) behind your function.

Last edited by Joozey; 01/31/08 01:56.

Click and join the 3dgs irc community!
Room: #3dgs
Re: I NEED HELP (MEDIA_PLAY) [Re: Joozey] #181026
01/31/08 03:05
01/31/08 03:05
Joined: Nov 2006
Posts: 497
Ohio
xbox Offline OP
Senior Member
xbox  Offline OP
Senior Member

Joined: Nov 2006
Posts: 497
Ohio
That Didn't work
I got a new error after the game window opens that says this:
Crash in play:media_play(@2,bmap_for_entity(screen_mdl,0,),100);
BTW, "play" is my function. Every thing is the same as before except the ";".
Any thing else?

Re: I NEED HELP (MEDIA_PLAY) [Re: xbox] #181027
01/31/08 05:55
01/31/08 05:55
Joined: Jun 2002
Posts: 3,682
Coppell, Texas
Ran Man Offline
Expert
Ran Man  Offline
Expert

Joined: Jun 2002
Posts: 3,682
Coppell, Texas
Well, I would not ever make a function called "play", but would call it something like "movie_play", as PLAY is too simple and might be reserved by the engine elsewhere.

But, try a different movie file and do something simple.
Play a small .avi that has a small resolution and see if that works first.

I had issues also making a movie in a game for a client, and all I did to get it to work, was to make the resolution of the movie smaller. lol


Cougar Interactive

www.zoorace.com
Re: I NEED HELP (MEDIA_PLAY) [Re: Ran Man] #181028
01/31/08 21:24
01/31/08 21:24
Joined: Nov 2006
Posts: 497
Ohio
xbox Offline OP
Senior Member
xbox  Offline OP
Senior Member

Joined: Nov 2006
Posts: 497
Ohio
Sorry but i still get the same exact error. I made avi, mpg, wmv. Nothing seems to be working. I went with a 300x240 resolution, is that small enough? Does it matter how big the is? I assume it's something wrong with the video since in the error, the file is replaced with @2. Any more suggestions?

Re: I NEED HELP (MEDIA_PLAY) [Re: xbox] #181029
02/01/08 01:06
02/01/08 01:06
Joined: Jun 2002
Posts: 3,682
Coppell, Texas
Ran Man Offline
Expert
Ran Man  Offline
Expert

Joined: Jun 2002
Posts: 3,682
Coppell, Texas
Yes, 320x240 works good. I have code at home that works and I'll post it here later. But, I used a 320x240 bitmap and not a model for it though.


Cougar Interactive

www.zoorace.com
Re: I NEED HELP (MEDIA_PLAY) [Re: Ran Man] #181030
02/01/08 01:41
02/01/08 01:41
Joined: Nov 2006
Posts: 497
Ohio
xbox Offline OP
Senior Member
xbox  Offline OP
Senior Member

Joined: Nov 2006
Posts: 497
Ohio
Okay, Thanks so much for your help man. I really appreciate it alot. If i need any thing else, hopefully you can help. I'll try the bmap instead.

Re: I NEED HELP (MEDIA_PLAY) [Re: xbox] #181031
02/01/08 04:13
02/01/08 04:13
Joined: Jun 2002
Posts: 3,682
Coppell, Texas
Ran Man Offline
Expert
Ran Man  Offline
Expert

Joined: Jun 2002
Posts: 3,682
Coppell, Texas
// Put this code outside of a function
string themovie = <allrace320.wmv>;
BMAP movie_map = <artsmovie.bmp>; // assumes 320x240
PANEL movie {
bmap movie_map;
pos_X = 352; pos_y = 250;
layer = 10;}

// Okay, now put this code inside a function
media_play(themovie,movie_map,77);

Okay, well the sprite should play the movie now.
The sprite is a 320x240 size and the movie will play on the sprite when your function is called.


Cougar Interactive

www.zoorace.com
Re: I NEED HELP (MEDIA_PLAY) [Re: Ran Man] #181032
02/01/08 16:56
02/01/08 16:56
Joined: Nov 2006
Posts: 497
Ohio
xbox Offline OP
Senior Member
xbox  Offline OP
Senior Member

Joined: Nov 2006
Posts: 497
Ohio
Thanks so much man, IT WORKS!!! But there is a problem. I am trying to make a game similar to the famous Guitar Hero so i need the movie to be projected on to a model or sprite so that it can be placed both above and below the fretboard. I want to show the music video of the song that is being played so panels aren't going to work unfortunatley. Pleas toss me more suggestions.Thanx

Re: I NEED HELP (MEDIA_PLAY) [Re: xbox] #181033
02/01/08 21:37
02/01/08 21:37
Joined: Jun 2002
Posts: 3,682
Coppell, Texas
Ran Man Offline
Expert
Ran Man  Offline
Expert

Joined: Jun 2002
Posts: 3,682
Coppell, Texas
Oh Hi,

Well, I have not tried this, but if that works, then this should also below.

First, put this code below outside of a function
Code:
 entity* thesprite; 



Next, Use the same sprite and put it in a level with the action below.



Code:
 action mysprite  // put this action of the sprite
{
thesprite=me; //assign the entity here to the sprite in the level...
}


// Okay, now put this in a function
media_play(themovie,bmap_for_entity(thesprite,0),77);

Okay, so when the function is called, then the movie should play on the sprite in the level now.

If this works, then remove the sprite from the level and put a model in it instead, and assign the same action to the model called "mysprite" and it should work.

Okay, have fun.


Cougar Interactive

www.zoorace.com
Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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