Ok, I've already seen that there's another threads opened for this thopic.
I apologize.
I apologize.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
videofile="Rosefall.ogv"; //here I set the videofile that must be load
videoloop=false; //this is a global bool to set as value in video.islooping
playbackground (videofile); //this is the call to the global function
Display("Playing"); //If I enter this I see the video running, but if not the video is not shown
stopplay(); //this is how I call the function to set video as null, because it didn't work in the original function in the else statement
videofile="Nebula2.ogv"; //setting another video
videoloop=true; //this is the way to set that the loop works agaoin
playbackground (videofile); //and this oe works fine
function playbackground (String videofile) {
if (Game.IsPluginLoaded("ags_d3d")) {
// Required for autoplay
D3D.SetLoopsPerSecond( GetGameSpeed() );
// Open video file
video = D3D.OpenVideo( videofile );
if ( video ){
// Use room coordinates
video.relativeTo = eD3D_RelativeToRoom;
// Anchor point to top left corner
video.SetAnchor( -0.5, -0.5 );
// Play!
video.Autoplay();
video.isLooping=videoloop;
}
else {
Display( "Couldn't open video." );
return;
}
}
else{
Display("Couldn't load ags_d3d plugin");
}
}
function stopplay() {
video=null;
}
Quote from: Cassiebsg on Sun 10/05/2020 00:02:14You are right, I will thank him in his post.
No problem, glad it could solve your problem.
But all credit goes to those who coded it and posted it for us to use. They deserve the big "thanks".
Quote from: Cassiebsg on Sat 09/05/2020 16:59:53This plugin rules!
It's possible to play video on the BG, you just need to use a plugin.
Edit: You can find it here: https://www.adventuregamestudio.co.uk/forums/index.php?topic=45348.0
give it a try before you give up.
Quote from: Cassiebsg on Sat 09/05/2020 16:59:53
It's possible to play video on the BG, you just need to use a plugin.
Edit: You can find it here: https://www.adventuregamestudio.co.uk/forums/index.php?topic=45348.0
give it a try before you give up.
Quote from: Crimson Wizard on Thu 07/05/2020 22:49:18
It's not very common to have 160+ frame animation full-background size, and your sprites, as you say, are 1177x250 in a 640x400 game. Do you really need this animation to be that big? Is all the 1177x250 area animating? Can you give an example of what is happening on background?
Quote from: Crimson Wizard on Thu 07/05/2020 22:49:18
Using video if possible is one solution, another is to break single animation object into parts which animate and don't animate.
Quote from: Crimson Wizard on Wed 22/04/2020 22:30:05Quote from: Cassiebsg on Wed 22/04/2020 22:00:15
I think it's
string magia="ABC";
AGS is case sensitive.and String does not equal string.
Lowercase string is a deprecated type, modern code uses String. Lowercase string has a hard limit of 200 characters, and cannot be assigned directly at all, you have to use StrCopy function (but have to disable "Enforce new-style strings" option in the General Settings first).
The reason why assignment does not work is one of many limitations of AGS script. Assignment at declaration only works with simple types, such as int, float and char.
If you need to assign a string at startup, declare string unassigned (that creates empty string), then assign it in game_start function.
String mytext = "Hell";
mytext = mytext.AppendChar('o');
Display(mytext);
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.111 seconds with 16 queries.