Jump to content
ℹ️ Intermittent Download History issues ×

How can I make a script that plays a bik video upon the player character's death?


FNVGuy1127

Recommended Posts

ive never used bik videos in my mods but the script would look something like this

 

you must use the " marks when typing playbink "filename.bik" or it wont work

 

-----------------------------------------------------------

 

SCN Playbikvideoondeathscript

 

Begin ondeath player

 

playbink "filename.bik"

 

end

 

-------------------------------------------------------------

 

Syntax

PlayBink filename.bik [interruptable] (optional(default=0)) [mute audio] (optional(default=1)) [pause music] (optional(default=1)) [letterboxed] (optional(default=1))

 

example. playbink filename.bik 0 = plays a video that can be interrupted by pressing ESC key

 

example. playbink filename.bik 1 = plays a non interruptable video

 

example. playbink filename.bik 1 1 = non interruptable video with background game sounds muted

 

example. playbink filename.bik 1 1 1 = non interruptable with game sounds and game music muted.

 

hope this helps

Link to comment
Share on other sites

i have attempted this today and the script creation was successful, however the bik video did not play upon my characters death. i am not sure what you would need to add to the script to make the video appear

 

i am thinking maybe a trigger activator box that is placed in the area after your character dies and the player activated trigger box activates the bik

 

-----------------------------------------------------

SCN playbikondeathscript

 

Begin onactivate player

 

BikActivatorbox.enable

 

end

 

---------------------------------------------------

Link to comment
Share on other sites

i have attempted this today and the script creation was successful, however the bik video did not play upon my characters death. i am not sure what you would need to add to the script to make the video appear

 

i am thinking maybe a trigger activator box that is placed in the area after your character dies and the player activated trigger box activates the bik

 

-----------------------------------------------------

SCN playbikondeathscript

 

Begin onactivate player

 

BikActivatorbox.enable

 

end

 

---------------------------------------------------

That might work, though I don't have the patience to work on it anymore, so I suppose it's free game now.

Link to comment
Share on other sites

If you want to use OnDeath Block, it has to be attached to the actor whose death you want to script. When you use "OnDeath player" you are just making a block that reacts to the death of the character that the script is attached to when the player is the one killing it.
OnDeath block fires when the actor finishes ragdolling so that's something that you want. However attaching a script to the player itself is a BIG hotspot for compatibility issues. The way I would go about it depends on one thing, whether or not you want NVSE as one of your requirements.

If you don't mind NVSE being one of the requirements you can just use an OnDeath Event Handler that reacts to the player death.

Otherwise you will have to keep a script running that detects the player death, so that would require to use GetDead every frame or every few seconds and play the video a few seconds after the character dies.

The last way you could do it is by having an Effect Script that is applied to the player with an obsenelely long duration and an ScriptEffectFinish block. That way you are kind of sure that the only way the effect is ending is when the player dies. Then you have it start a dummy quest with a small countdown before playing the video.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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