Jump to content

How to make a script that will give encumbrance effects on player


ericspace1

Recommended Posts

  • 4 months later...

Hi. I just saw this and I actually have been making a mod that also needs to be able to encumber the player. Hopefully you're still interested.

 

First, I found no good way to apply the encumbrance effect without actually encumbering the player. What I did was create a custom item the the creation kit that weighed a lot, then did

Weapon property _ModNameBurdenItem auto
Actor property PlayerRef Auto

in my script, and and filled those in the creation kit.

You'll probably want to use

https://www.creationkit.com/index.php?title=RegisterForControl_-_Form

https://www.creationkit.com/index.php?title=OnControlDown_-_Form

but I personally don't have experience with them.

You can make the script automatically run by attaching it to a quest and having the quest StartGameEnabled.

Link to comment
Share on other sites

That would work. Another option, depending on what you're trying to do, would be to change the player's carry weight actor value. Something like:

PlayerRef.SetAV(CarryWeight, 0)

 

This would encumber the player unless they weren't caring anything at all (very unlikely). If you do this, don't forget to GetAV(CarryWeight) first and store the value so you can reset it when your effect is done. Since you probably don't want this to be a permanent effect.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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