so i'm making a shelter and i have some vending machine models, however i have no idea how to get them to work.
Does anyone by any chance have a script to automatically open a store when you interact with an object? (as with regular FO4 vendors)
As Zorkaz said, the barter menu is tied to actors but what you can do is to create a dummy NPC whose sole purpose is to act as a vendor when your vending machine is activated.
1. Create a dummy vendor NPC and a vendor faction.
Spoiler
(I have the "essential" and "unique" boxes ticked here, but this is completely unnecessary.)
2. Create a dummy interior cell to house this dummy NPC vendor and the vendor chest.
Spoiler
The cell doesn't have to be functional. Just something to hold the NPC and the chest.
3. Create an activator to access this dummy vendor NPC.
Spoiler
The vendor NPC and the activator share the same name for consistency when bringing up the barter menu.
This script example plays a sound FX, and then opens a barter menu with the dummy vendor NPC. I think I had to disable player control while the sound FX played so that the player won't move once it is activated.
Once this thing is activated in game, it will directly show the barter menu associated with the dummy NPC.
I hope this helps.
Edited by DiodeLadder, 07 September 2021 - 03:02 am.