Fast vending machine system in Fortnite UEFN

Getting “free” ammo and various weapons is certainly cool, but personally I’ve always liked it better when you have to at least tinker a little and exchange or buy what you need in the game. So today we’ll look at one of the lazy options for how to make a vending machine in Fortnite only with UEFN, without using Verse.

I want to note right away that this is just a cutter version of a YouTube video from user hacz, this is not my own development. I understand that it’s more “correct” to do it with Verse, with a bunch of gadgets, but this option works and it’s implemented quite quickly.

So let’s start by adding a Vending Machine to our map – a vending machine from which we will buy what we need. In this example, I’ll add a vending machine for selling ammo. So we open the Content Drawer, enter Vending in the search bar, see our machine, and drag it to where we need it.

I want the resource for purchase to be gold, so we click on our machine, and in the User Option – First Item Resource Type section we select Gold, below, we check the Cost of First item checkbox and for example we set the price – 10.

In the Item List section we indicate what exactly we will buy, and in what quantity.

In general, this is enough for the laziest option, because the machine is there, it gives us cartridges – everything is great. If only there were one but – when buying the resource that we specified – gold, it is not deducted from our inventory. In order to fix this and make a full-fledged purchase, parting with money, we do the following.

We add the device – Mutator Zone, and make it a store room, so to speak, that is, we put it where our machine is, and in the zone settings we set Zone Width, Zone Depth, Zone Height to the imaginary size of the store and arrange the zone in such a way that our machine is in the middle of it.

Next, we add two Class selector devices and one Class Designer.

In the first class selector we set the value Class to Switch to for example 1, in the second – 2.

In the first selector also in User Option – Change Player to Class we select our “room” device – Mutator Zone and On Player Entering Zone

Now in the Class Designer in the Class Identifier we select the Class Slot and the index that we set for our first class select – 1, and also check the box for Infinity Building Materials

Now in the second class selector, where we set the index to 2, in Change Player to Class we select our Mutator Zone and On Player Exiting Zone

Save and test. Now when purchasing cartridges in our machine, gold will be deducted from our inventory.

Once again, I would like to emphasize that this method is not the best, but if you are not yet very familiar with Verse programming, this is also a good option for creating vending machines.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *