g0hahi Posted January 29, 2023 Posted January 29, 2023 I've been modding for some time now, however i still consider myself a beginner, and as such there are stuff that i still can't wrap my head around, one of them being additem(). I've tried to use it on several different occasions now, and every time it just doesn't work and i figure out some alternative method. For example here i tired to add an item to a container set by a quest stage: Spoiler ;fragment start containerRefAlias.getref().additem(itemproperty, 1, false), only works if the cell the container is in is loaded, despite being marked as persistent ;fragment end and here i tried making something like the courier system from skyrim Spoiler ;fragment start itemAliasRef.forcerefto(game.getplayer().placeatme(itemproperty) (courierquest as courierquestscript).addaliastocontainer(itemAliasRef) ;fragment end function addAliasToContainer(ReferenceAlias refAliasToAdd) objectReference vObjectRefToAdd = refAliasToAdd.getReference() addRefToContainer(vObjectRefToAdd) EndFunction function addRefToContainer(objectReference objectRefToAdd) CourierContainerProperty.addItem(objectRefToAdd) CourierItemCountGlobal.value += 1 endFunction this also doesnt work, the global doesnt get increased, however when i use cqf from the console, it does Obviously i'm missing something here, but i cannot figure it out on my own so i'm hoping someone here could point me the right way
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now