Ich schreib' den code ganz einfach hier ins forum, dann kann ihn jeder einsehen (und kommentieren oder verbessern, wenn ihm was auffällt
):
So, how can you create your panel?
You need a paint program like windows paint, it mustn't be something special.
Look, your video has a resolution, e.g. 320x240, if it's an other resolution, replace all what I say with your one.
Now you create a picture with
this resolution, and save it in the .pcx or the .bmp-format (no .tga files!).
Now, enter into your script file:
Deutsch:
Du brauchsch 'n Malprogramm wie Windows Paint, des muss nix besonderes sein.
Dein Video hat jetzt eine bestimmte Auflösung, 320x240 zum Beispiel. Wenn's ne andere hat, eben damit ersetzen. Jetzt machst du ein Bild mit dieser Auflösung und speicherst es im .pcx oder im .bmp-Format (keine .tga-Dateien!).
Dann trägst du in dein Scriptfile ein:
code:
entity avi_bg_panel{
type = <yourfile.pcx>; //or .bmp, your format
layer = 2; // like the panel layer
flags = visible; // like the panel-visible-parameter (don't try to set refresh or d3d here!)
view = CAMERA; // Your camera x = 100; // Distance to the view
y = -50; // 50 to the right
z = 0; // in the middle (vertical)}
NOTE:
the x parameter sets the distance to the view
the y parameter sets the horizontal position (0 is in the middle)
the z parameter sets the vertical position (0 is in the middle)
you can converse with this entity like you do with a panel:
avi_bg_panel.visible = off for example sets it invisible.
Now, add the avi-play-code after the entity-code:
Deutsch:
Der x-Parameter gibt die Distanz zwischen Kamera und Entity an.
Der y-Parameter die horizontale Position (0 entspricht der Mitte).
Der z-Parameter die vertikale Position (0 entspricht der Mitte).
Mit dieser Entity kann man jetzt wie mit einem Panel kommunizieren:
avi_bg_panel.visible = off macht sie zum Beispiel unsichtbar.
Jetzt schreibst du den avi-spiel-code nach der Entity-Definition in dein Script-File:
code:
define avi_bg_volume, 0;// Defines the volume for your video. I'd set it to 0.
var avi_bg_file_handle;
function set_avi_playing()
{
ent_preload(avi_bg_panel);
wait(3);
media_loop("yourvideo.avi", bmap_for_entity(avi_bg_panel, 0), avi_bg_volume);
avi_bg_file_handle = media_handle;
}
function stop_avi_playing()
{
media_stop(avi_bg_file_handle);
}
NOTE:
your files must be in your game-directory, otherwise they wouldn't be found!
you must own 3dgs commercial v.5.51!
Until the position of the panel isn't correct you have to change the x, y and z parameters (I can't say you specified values)!
I hope I helped you with this code!
(Excuse my english)
Deutsch:
Achtung:
Deine Dateien müssen in deinem Spielpfad liegen, damit sie gefunden werden.
Du musst die GameStudio Commercial v.5.51 besitzen!
Du musst die x, y und z-Parameter so lange verändern, bis sie deinen Anforderungen entsprechen (Ich kann dir jetzt hier keine bestimmten Werte angeben.).
Hoff', dass ich euch mit dem Code helfen konnte!
(Entschuldigt mein Englisch!)
Grüßle, Jey Key.
PS: Wenn der Code euch hilft, könntet ihr mir ja 'n paar Sterne geben... *giergier* .
PPS:
Ich find den Smiley voll süß: