Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Playing an Avi in the Pro 6.1 Game Engine #44717
04/20/05 17:29
04/20/05 17:29
Joined: Apr 2005
Posts: 47
webamerica Offline OP
Newbie
webamerica  Offline OP
Newbie

Joined: Apr 2005
Posts: 47
Dear Conitec,

I am new at building games so please bear with me on some support issues i may have from time to time.

Here is the problem i am currently experiencing.

I need a complete working script to play an avi inside the game and where to place it exactly in the main script for the Pro 6.1 engine.

I have tryed every script that has been posted in the forums and none of them have worked for me as of yet.

I have also searched the help files that are included with the game engine
and have tryed all of the included sample scripts.

None of them have worked either.

I also upgraded to the latest Pro Version but i actually did not care for it
so i deleated that engine and reinstalled the Pro 6.1 again without checking to
see if any of the scripts i have for the avi would work in the upgrade because it meant taking more time to learn the new engine functions and navigation.

I feel very comfortable with the Pro 6.1 version so my desire is to continue
using this version for now.



Perhaps their is a way to use DLL scripting instead of C++?

The system i am currently building the game on is as follows.

Professional 6.1 Game Engine

System Info:

Windows XP PRO
Pentium 4 2.8
1.5 RAM

Any scripts, advice, suggestions or help would be greatly appreciated.

Sincerely,

Charles

Re: Playing an Avi in the Pro 6.1 Game Engine [Re: webamerica] #44718
04/20/05 18:46
04/20/05 18:46
Joined: Mar 2004
Posts: 1,201
Switzerland, Baselland
Bird Offline
Senior Developer
Bird  Offline
Senior Developer

Joined: Mar 2004
Posts: 1,201
Switzerland, Baselland
Ok, i'm not conitec, but i think, you should update to the newest version of A6. With this update you will have more and better features, less bugs and a faster engine. Newest Update is A6.31.4

PS: I have read, that you had the newest Update, but you should really update it (again). It's much better!

Last edited by Bird; 04/20/05 18:50.

- A6pro 6.40.5
Re: Playing an Avi in the Pro 6.1 Game Engine [Re: Bird] #44719
04/20/05 20:32
04/20/05 20:32
Joined: Apr 2005
Posts: 47
webamerica Offline OP
Newbie
webamerica  Offline OP
Newbie

Joined: Apr 2005
Posts: 47
Hello,

Thank you for your suggestion on upgrading a second time to the 6.34 engine.

I took your advice and completed the upgrade.

Unfortunately none of the avi scripts work.

Recieve error message (Keyword unknown word Media_play
script error - engine shutdown)

This is why i am seeking a completed script to play an avi inside the game on a sprite.

Please keeep me posted if you find one that might work.

Please find my original post enclosed below.

------------------------------------------------------------------------------

I am new at building games so please bear with me on some support issues i may have from time to time.

Here is the problem i am currently experiencing.

I need a complete working script to play an avi inside the game and where to place it exactly in the main script for the Pro 6.1 engine.

I have tryed every script that has been posted in the forums and none of them have worked for me as of yet.

I have also searched the help files that are included with the game engine
and have tryed all of the included sample scripts.

None of them have worked either.

I also upgraded to the latest Pro Version but i actually did not care for it
so i deleated that engine and reinstalled the Pro 6.1 again without checking to
see if any of the scripts i have for the avi would work in the upgrade because it meant taking more time to learn the new engine functions and navigation.

I feel very comfortable with the Pro 6.1 version so my desire is to continue
using this version for now.



Perhaps their is a way to use DLL scripting instead of C++?

The system i am currently building the game on is as follows.

Professional 6.1 Game Engine

System Info:

Windows XP PRO
Pentium 4 2.8
1.5 RAM

Any scripts, advice, suggestions or help would be greatly appreciated.

Sincerely,

Charles

--------------------
Excell Technologies

Re: Playing an Avi in the Pro 6.1 Game Engine [Re: webamerica] #44720
04/20/05 21:39
04/20/05 21:39
Joined: Feb 2005
Posts: 130
R
Roger Offline
Member
Roger  Offline
Member
R

Joined: Feb 2005
Posts: 130
hmm...Keyword unknown word Media_play...
try this command at the end of the main function before the "}" of your level:
media_play("my_movie.avi", null, 100);

replace my_movie.avi by the real name of your video file ,and make sure the AVI is in the same directory than the WMP.

It should work if you did that right .


STREETKICKER IS DOWN ! ...Soon in your street !
Re: Playing an Avi in the Pro 6.1 Game Engine [Re: webamerica] #44721
04/20/05 21:39
04/20/05 21:39
Joined: Oct 2003
Posts: 2,628
IL,US
FeiHongJr Offline
Expert
FeiHongJr  Offline
Expert

Joined: Oct 2003
Posts: 2,628
IL,US
heres a code i use to play a movie on a model should be pretty much the same.

Code:

var tv_handle = 0;
function new_tv()
{
if(event_type == event_scan && media_playing(tv_handle)== 0)
{
media_play("01.avi",bmap_for_entity(my,2),100);
tv_handle = media_handle;
}
}


action activate_TV// action to attach to tv
{
//TV = me;
my.enable_scan = on; // sensitive to scans
my.event = new_tv;// run tv_on_off if im scanned
while(1)
{
if(media_playing(tv_handle) != 0)
{
my.skin = 2;
}
else
{
my.skin = 1;
}
wait(1);
}
}



Hope it helps/


http://www.freewebs.com/otama_syndicate/index.htm - Each master to his own technique.

- Not me said the bee, Nor I said the fly.
Re: Playing an Avi in the Pro 6.1 Game Engine [Re: webamerica] #44722
04/21/05 15:27
04/21/05 15:27
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline
Senior Expert
PHeMoX  Offline
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
I really recommend updating your version to the newest version, though i'm sure there's no bug for the mediaplay function, you're missing the whole shader features and some other big improvements... As far as your script problem, maybe you should download the newest manual from the download page, and look up the function media_play , because 99% of the functions are explained with a short example, which will definately help you, i'm sure!
Also usually when the engine gives this error, it could mean you did a few things wrong, for example at the end of each line of code should come a ; Or you made a typo or something like that, maybe you can post your script??

Cheers


PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
Re: Playing an Avi in the Pro 6.1 Game Engine [Re: PHeMoX] #44723
04/21/05 20:34
04/21/05 20:34
Joined: Jul 2000
Posts: 8,973
Bay Area
Doug Offline
Senior Expert
Doug  Offline
Senior Expert

Joined: Jul 2000
Posts: 8,973
Bay Area
Quote:

I really recommend updating your version to the newest version,




If I understand his posts, he did upgrade, then returned back to 6.1, and then is now back to the latest version.

Try “FeiHongJr” solution and let us know if it works. Remember, as a Pro owner you have a year of support. We can't answer programming questions but, if you think you have a bug, please let us know.


Conitec's Free Resources:
User Magazine || Docs and Tutorials || WIKI
Re: Playing an Avi in the Pro 6.1 Game Engine [Re: Doug] #44724
04/22/05 02:50
04/22/05 02:50
Joined: Oct 2002
Posts: 2,256
Oz
L
Locoweed Offline
Expert
Locoweed  Offline
Expert
L

Joined: Oct 2002
Posts: 2,256
Oz
Hi webamerica,

Perhaps you should post the part of the code where you are trying to play the avi, then someone could look at it and see if they see something wrong with the code itself. Alot of times with the kind of error you explained, the actual error is in one of the lines above the line of code where the error shows up, usually a syntax error, this may or may not be the problem, but it wouldn't hurt to show the code and find out.

Loco


Professional A8.30
Spoils of War - East Coast Games
Re: Playing an Avi in the Pro 6.1 Game Engine [Re: Locoweed] #44725
04/22/05 04:03
04/22/05 04:03
Joined: Apr 2005
Posts: 47
webamerica Offline OP
Newbie
webamerica  Offline OP
Newbie

Joined: Apr 2005
Posts: 47
Hello,

As you requested here is a sniplet of the code and it's placement in the script.
-----------------------------------------------------------------------------
I did try this script enclosed below and it opens the avi for about
1-1/2 frames with no sound and then i recieve the following error message.

Acknex has encountered a problem and needs to close.
To be more specific, it crashes the game.

Interestingly enough, no other script will even open the avi.
This will at least perform the function as far as i mentioned above.

I have tryed several file sizes on the avi's from very large to very small
with out any change in the ability to run the avi.

So the size does not seem to be the issue or at least not at this point untill we find the script and or the location to place the script in the main wdl.

However, the resolutions of the avi's that we make are of broadcast quality
since this is one of the services we provide to the film, video and television industry.

I mention the possible problem with the resolution being to high and the frame rate to fast for the engine to run based on the help files which point out that it is best to keep both as low as possible.

At this point i do not know how to adjust down or up an avi resolution or frame rate to satisfy the engine if this is what it needs.

Please find the script that peforms the above mentioned actions.
Please remember that this is the only script that has even come close to running an avi so far.

/////////////////////////////////////////////////////////////////
// The main() function is started at game start
function main()
{media_play("walls.avi",Null,100);


// set some common flags and variables
// warn_level = 2; // announce bad texture sizes and bad wdl code
tex_share = on; // map entities share their textures

// center the splash screen for non-640x480 resolutions, and display it
splashscreen.pos_x = (screen_size.x - bmap_width(splashmap))/2;
splashscreen.pos_y = (screen_size.y - bmap_height(splashmap))/2;
splashscreen.visible = on;
// wait 3 frames (for triple buffering) until it is flipped to the foreground
wait(3);

// now load the level
level_load(level_str);
// freeze the game
freeze_mode = 1;

// wait the required second, then switch the splashscreen off.
sleep(5);
splashscreen.visible = off;
bmap_purge(splashmap); // remove splashscreen from video memory

// load some global variables, like sound volume
load_status();

// display the initial message
msg_show(mission_str,10);

// initialize lens flares when edition supports flares
ifdef CAPS_FLARE;
lensflare_start();
endif;

// use the new 3rd person camera
move_view_cap = 1;

// un-freeze the game
freeze_mode = 0;

// client_move(); // for a possible multiplayer game
// call further functions here...
}
{

As you requested i am sending you this information to see if we can possibly
continue to search for soulutions.

Re: Playing an Avi in the Pro 6.1 Game Engine [Re: webamerica] #44726
04/22/05 06:46
04/22/05 06:46
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
A crash when playing a movie file can happen when the file itself, or the CODEC on your PC is faulty.

However, this forum section is not suited for technical support. Please contact our support directly.

Page 1 of 2 1 2

Moderated by  HeelX, Spirit 

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