Jump to content
-Killet-

Play intro OGV from Mod

Recommended Posts

Hi guys!

So I´m making a new mission and just spent alot of time making a introvideo for my mission in .ogv format.

 

everything works fine running it from 

initplayerlocal.sqf

Quote

sleep 5;

play = ["intro.ogv"] spawn BIS_fnc_PlayVideo;

 

 

However, the filesize of the OGV is about 32mb and I feel it is alot together with other sounds I added to the mission.

so what I would like to do is to make the players download a mod. where they have all theese files already so they dosn´t have to download them with the missionfile.

 

here is my problem.

I can´t find any good way of running the .ogv from the mod I created.

what I need is a script that can run the video from my "killetmedia" mod.

play = ["\Killetmedia\intro.ogv"] spawn BIS_fnc_PlayVideo;

when the player is on the server.

 

any suggestions are welcome! =)

 

Thanks guys!

 

 

My mods content:

Modname: Killetsmedia

intro.ogv

config.bin

config.cpp (this one makes sure that the init.sqf is being run)

init.sqf

initPlayerLocal.sqf (I have tried putting the code in this one without any luck)

 

 

config.cpp

Quote

class CfgFunctions {

    class Killetmedia_mod {

        class Killetmedia {

            class Init {

                file = "\Killetmedia\init.sqf";

                postInit = 1;

            };};};};

 

Share this post


Link to post
Share on other sites

Oh this is not how mod config should looks like.

Basically it should start with cfgPatches

class CfgPatches
{
	class Killetsmedia
	{
		author="-Killet-";
		name="Playable Content Videos";
		url="https://www.arma3.com";
		requiredAddons[]={};
		requiredVersion=0.1;
		units[]={};
		weapons[]={};
	};
};

 

Share this post


Link to post
Share on other sites

I do have the cfgPatches just forgot to put it in there. Have no clue about why it needs to be there tho. =)

Quote

 

class CfgPatches {

    class Killetmedia_mod {

 

        units[] = {};

        weapons[] = {};

        requiredAddons[] = {};

        author[] = {"-Killet-"};

        authorUrl="https://steamcommunity.com/groups/A3KS";

    };

};

 

class CfgFunctions {

    class Killetmedia_mod {

        class Killetmedia {

            class Init {

                file = "\Killetmedia\init.sqf";

                postInit = 1;

            };

        };

    };

};

 

 

Share this post


Link to post
Share on other sites

Here you have your example how to load media with mod.

https://drive.google.com/file/d/190uFxyv5JXoxFXCA-RPp3AeNb7ixgCkH/view?usp=sharing

 

you have access to file like this:

 

initPlayerLocal.sqf

 [] spawn {
	waitUntil {sleep .5; getClientState == "BRIEFING READ"};
	["\killetsmedia\intro.ogv"] call BIS_fnc_PlayVideo;
 };

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×