Jump to content

Recommended Posts

Posted

Hello, so i've made a mod that for working requires the characters to wear a ring. I've seen the pinned post on how to add an item to a container and it worked, but from what i've seen i think it only works with containers that have never been opened. I'll like a way to make sure the player gets the rings doesn't matter where they'll be. 

  • Hmmm 2
Posted (edited)

This works for me, even with an already opened container:

image.thumb.png.ad71048fc8e2c611cfb8ab6bf9990186.png

In this case the 22746573-3fea-4362-bc8c-a919703d5793 is the ID of the container, which I got with the "PrintInstance oei_hovered" console command.

if
{
    IsInActiveScene(22746573-3fea-4362-bc8c-a919703d5793)
}
then
{
    GiveItemsToObject(22746573-3fea-4362-bc8c-a919703d5793, Drug_Svef, 1)
}


 

Edited by Noqn
  • Like 1
Posted (edited)

You can also put items straight into the player's inventory with:

if
{
	not IsInActiveScene(546e5d97-c234-46dc-9439-b23aafc02198)
}
then
{
	GiveItems(Drug_Svef, 1)
}

 

Edited by Kvellen
  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...