Jump to content

Recommended Posts

Posted

OK so I have been writing script all day. Linked chests and activators and making book shelves. EVERYTHING works great. EXCEPT this script lol. What am I doing wrong?

 

The activator is set to Player Activated in the primitive tab, its not stuck in a collision box, the script compiles perfectly, the object reference property is set and the trigger is canted slightly so it isn't all zeros. I can see the activator in game but when I tap E, nothing happens. The container below is full of ingredients but nothing is removed from the container to the player inventory.

  • Replies 44
  • Created
  • Last Reply

Top Posters In This Topic

Posted

What is the final script code?

Are you testing on a save or new game that has not seen the activator loaded yet?

Does the container in question actually have items in it?

Do the items transfer if you open and close the container first?

Posted
  On 4/21/2021 at 11:03 PM, IsharaMeradin said:

What is the final script code?

Are you testing on a save or new game that has not seen the activator loaded yet?

Does the container in question actually have items in it?

Do the items transfer if you open and close the container first?

Disregard. I coc'd in to my mod (i just learned how) and it works. Bad in game save I presume. Thanks so much! It is a little slow which I assume is a stack dump. You mentioned another way that wouldn't?

Posted

Slow doesn't necessarily mean a stack dump. A stack dump would be evident in the papyrus log, otherwise you'd have no idea that one ever took place. The routes that would avoid causing stack dumps would probably take longer as they must go through and transfer the items one at a time rather than the whole lot at once.

Posted (edited)

OK. :Deep breath: weirdest thing. it just stopped working. When I responded to you last, I had just finished screen recording myself going to the activator and trying it. It worked. But now it doesn't work at all. I am so confused. So I am going back to answering your questions.

 

Script below.

I tried both game save and console teleport.

Yes there is 1 of each ingredient for testing purposes.

I am going to try that now. ---edit--- You called it. I have to open the wardrobe 1st and then it will work properly. How did you know that?

Scriptname JLRemoveAlcIngredients extends ObjectReference
 
ObjectReference Property JL_Alchemy_Wardrobe Auto
 
Event OnActivate(objectReference akActivator)
If akActivator == Game.GetPlayer()
JL_Alchemy_Wardrobe.RemoveAllItems(akActivator)
debug.notification("All Ingredients Equipped")
EndIf
EndEvent
Edited by Chris20201986
Posted

I am nearing completion of my player home. I appreciate the help given. I am working on the last script needed for a trophy room. I have been searching for a tutorial on the trophy bases but the only one I can find is Darkfox127. Although his is cool because you can actually remove the trophy and replace if you get tired of that trophy unlike the vanilla version where you are stuck with what you put. But I spent half an hour following his tut as best as possible. There are A LOT of steps to make that work for EVERY trophy piece. After completing ONE trophy, I tested and it didn't work. I did so much for that I have no idea where to start to find my mistake so I was just reaching to see if there was a much easier way to go about the trophy bases. So, is there? Even a vanilla version.

 

My trophy bases are going to be initially able. Player will not have to build this house. They can walk into the trophy room and just put trophies on as they choose with required materials of course.

Posted

Place your trophy base, set this to be enabled.

Place the object for the trophy, set this to be disabled.

Wrap an activator around the trophy base.

Apply a script to the activator. This script will if the player has the correct items, enable the trophy object and remove the items from the player inventory.

 

An example script allowing any number of items with differing quantities of each (needs tested for compilation and function):

 

  Reveal hidden contents

 

There are other possible routes to achieve what you want.

Posted

Now this script would be for ONE particular trophy correct? Not giving the player the choice to pick other trophies? Not that it bothers me, I am just asking to be sure.

 

ListOfRequiredItems-I must make a form list of the items I would require the player to have in order to make a particular trophy and replace this with my form list name?

Integer property-the quantity of each item in the form list and must match that list sequentially?

ObjectReference Property TrophyDisplay-the actual item on the trophy base that I initially disabled?

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...