Jump to content

Photo

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

new vegas script death

  • Please log in to reply
6 replies to this topic

#1
FNVGuy1127

FNVGuy1127

    Journeyman

  • Members
  • Pip
  • 43 posts

I'm trying to figure out how I can make a video play upon the character's death for a mod, and I think that it requires a script with these ( https://geckwiki.com...p?title=OnDeath https://geckwiki.com...?title=PlayBink ), but I don't know how to do it.



#2
Mcdoye

Mcdoye

    Enthusiast

  • Premium Member
  • 234 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



#3
UnvalidUserName

UnvalidUserName

    Enthusiast

  • Members
  • PipPip
  • 204 posts
How do you want the death scene to happen? Do you want to play the video as soon as the player dies or after his corpse finishes ragdolling?

#4
Mcdoye

Mcdoye

    Enthusiast

  • Premium Member
  • 234 posts

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

 

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



#5
FNVGuy1127

FNVGuy1127

    Journeyman

  • Members
  • Pip
  • 43 posts

How do you want the death scene to happen? Do you want to play the video as soon as the player dies or after his corpse finishes ragdolling?

After the player's body stops ragdolling.



#6
FNVGuy1127

FNVGuy1127

    Journeyman

  • Members
  • Pip
  • 43 posts

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.



#7
UnvalidUserName

UnvalidUserName

    Enthusiast

  • Members
  • PipPip
  • 204 posts

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.







Also tagged with one or more of these keywords: new vegas, script, death

Page loaded in: 0.997 seconds