Citizenbari Posted January 30, 2020 Share Posted January 30, 2020 (edited) Hello, i need some help to solve this problem (my skills end here..), if someone has a solution i would be very very happy :smile: Problem: I want to find out the number of a certain item when it is placed in an settlement. This amount should be available in a GlobalVar,so that I can query this GlobalVar value within packages / conditions. For example: If in Covenant, Taffington Boatshouse and Sanctuary each one of this item is placed then the GlobalVar should contain "3" Right now i am already able to get the info if this object is in the local area placed by using the condition "LocationHasRefType" andassign the Furniture / item to my created ForceRefType category. Additional question:Is it ok to choose already ingame placed item (like a car or road sign) to let an NPC travel to that destination(with an individual package) or does it have to be an xmarker/xmarker heading?! Edited January 30, 2020 by Citizenbari Link to comment Share on other sites More sharing options...
Citizenbari Posted February 6, 2020 Author Share Posted February 6, 2020 (edited) . Edited February 6, 2020 by Citizenbari Link to comment Share on other sites More sharing options...
SKKmods Posted February 6, 2020 Share Posted February 6, 2020 What types of objects are you interested in, are they base game or have you created therm so you can attach scripts ? Actor AI package travel targets can be any ObjectReference as long as they can path to them, best to allow a "near" radius ~512 units incase they are not attached to navmesh. Link to comment Share on other sites More sharing options...
Citizenbari Posted February 9, 2020 Author Share Posted February 9, 2020 (edited) Thank you for your post SKK50, meanwhile Kitcat81 helped me here. The following script does exactly what i needed. I hope it helps others who have equal problem too!The script attached to a workshop object (chair, table whatever, more than one is possible) will count the amount and set it in a GlobalVar (in this case GlobalVar name is "x").The GlobalVar hast to set in the properties of the script! When the object is destroyed or removed the value will change. GlobalVariable Property XObjectCount Auto Const ; the property must be filled with your global variableEvent OnWorkshopObjectPlaced(ObjectReference akReference) XObjectCount.SetValue(XObjectCount.GetValue() + 1) ; adds 1 to the global count when the object is created in the workshopEndEventEvent onWorkshopObjectDestroyed(ObjectReference akReference) XObjectCount.SetValue(XObjectCount.GetValue() - 1) ; removes 1 from the global count when the object is destroyed or stored.EndEvent Edited February 9, 2020 by Citizenbari Link to comment Share on other sites More sharing options...
Zorkaz Posted February 9, 2020 Share Posted February 9, 2020 Cool. Please post a link to your mod here, once you're finished. I'm really curious about how you are using it Link to comment Share on other sites More sharing options...
Recommended Posts