Jump to content
Sign in to follow this  
cobra5000

youtube code

Recommended Posts

Can everyone tell me where i put this code to work:

//Open

_isOpened = openYoutubeVideo "watch?v=UBIAbm7Rt78";

in the trigger's init; .sqs script, .sqf script or somewhere else?

Share this post


Link to post
Share on other sites

Depends on what you want to do with it, you can't put it in a trigger because you're using a local variable in a global scope (_isOpened), if you remove that underscore it can work in a trigger.

You could also use it in a sqf script if you're using the action menu to start the video.

In other words, it all depends on how and when you want the video to be opened.

Kind regards,

Sanchez

Share this post


Link to post
Share on other sites

i put this code as .sqf file

next i put it on my player as "ap" and then put this on the unit's init:

ap addAction ["Video","Video.sqf"]

but it didn't work althought the steam layout is active

Share this post


Link to post
Share on other sites

Are you using the Dev Build ?

Because that command is not included in the stable version (1.20) yet.

Share this post


Link to post
Share on other sites

Biki says it's available from version 1.22 which basically means he uses DevBranch.

Share this post


Link to post
Share on other sites

I know what the wiki says, but that doesn't tell us anything about the version he's using or does it? :rolleyes:

Share this post


Link to post
Share on other sites

No, I'm just guessing, like you. But I don't see any other option.^^

Share this post


Link to post
Share on other sites

A recent script command let's you open a YouTube video directly in the Steam overlay (if enabled). openYoutubeVideo gives quite a bit of control over the various options, since you don't just provide the video ID, but other playback parameters as well. For security reasons we have restricted its use to outside scenarios only (e.g. in the game's UI or a mod's UI). We'll be using it ourselves to link & play the Community Guide series from within the game in Bootcamp Update.

http://dev.arma3.com/sitrep-00061

Share this post


Link to post
Share on other sites

Bolded the important part:

A recent script command let's you open a YouTube video directly in the Steam overlay (if enabled). openYoutubeVideo gives quite a bit of control over the various options, since you don't just provide the video ID, but other playback parameters as well. For security reasons we have restricted its use to outside scenarios only (e.g. in the game's UI or a mod's UI). We'll be using it ourselves to link & play the Community Guide series from within the game in Bootcamp Update.

http://dev.arma3.com/sitrep-00061

So you can't use it from a regular mission. The wiki really should have this info.

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
Sign in to follow this  

×