Jump to content

[LE] [HELP] How to script a video to play after a certain event


Recommended Posts

First of all you need your video to be in a "BINK" format, otherwise the game will not recognize it and play it.
Bink format converter:
* Try to use an uncompressed source video for better quality result.
* There is a maximum video size limit (size in length / mb and in screen / aspect ratio) that the game can support, otherwise it will cause CTDs, but i do not remember them right now, if i do remember i'll come back to this later.
But you can also experiment yourself with it or research it.
Now you need something and event in your mod that will fire the script to play your video:
Script example:
Event OnActivate(ObjectReference akActionRef)
          If ( akActionRef == Game.getPlayer() )
               Game.PlayBink("MyCoolVideo.bik")   ; Be sure that you have the CORRET and EXACT video's NAME and it's extension at the end
   EndIf
EndEvent
Function PlayBink(string asFileName, bool abInterruptible = false, bool abMuteAudio = true, bool abMuteMusic = true, \
bool abLetterbox = true) native global
* Your video file must be placed in data / video.
* The file name inside the script must have also it's extension.
* Be sure that the video will play on a secure for the player situation, otherwise if you fire it when the player is in combat this will not pause the game and the fight will go on without the player been able to see anything.
Have a happy modding.
Edited by maxarturo
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...