Playing animations |
Moviefiles can only be played in fullscreen mode. If you have a small movie that you want to play in a certain area of the screen you can create an animation.
The classic game Myst uses these a lot in the game. First you need to extract single frames for your movie and save them to jpg files like name001, name002 and so on. There are plenty of freeware tools that can do that automaticly.
Then you need to add all images to your mediapool (maybe some hundreds), you should put them in their own folder.
To play all images as an animation you will need the commands playanimation and stopanimation.
playanimation (name ; fps ; x ; y ; width; height) |
The name is the prefix of all your files without the numbering. The game will look for all files beginning with that name and play them in order.
Fps is the number of frames per second. If the images were extracted from a video you will need to use the videos speed setting. Example : If the video was running at 30fps and you ripped every second frame you will have to use 15fps to play the animation with the same speed as the video.
Animations can be played backwards. Use a negative number as FPS for that.
X, Y just as Width and Height will set the position and the size of the animation. Animations are on top of all other graphics and not connected to the currently loaded room. The animation will keep its position even if the room position changes. When all frames have been played the animation automaticly stopps. There is no need to stop it manually in that case.