Instant Reload on Elimination

Hello!

A week ago I have started using the unreal editor, and I have created a normal 1v1 map, to play with my friends actually, as there are other maps that are missing some details that I would like to have.

The thing is, I’ve seen a few maps where, when you eliminate the opponent, all the weapons reload instantly. I don’t want to make a loadout selector and have an item granter wipe and spawn the inventory again as I have a huge amount of weapons to choose from on the map, and making every combination would be impossible.

I have read that the only way to do this is by programming with Verse, I have no idea how to use it but I am willing to learn.

If anyone can explain to me in guide form how this process would be done, or even if you are generous enough, let me have the code, I would be eternally grateful.

Thank you all in advance!
Greetings :slight_smile:

Hey Byakko ち,

There is this in Snippets written by Thomas Burns / Twin

wow thank you so much, i didn’t find that.

I don’t really know how to use that, i saw the conditional buttons things somewhere, but since i don’t know how to import the code to that conditional buttons, or how many i have to add and that things, im a little bit lost. I will be trying tho.

If you do understand the thing and you can explain it a little bit, you would be amazing, but if you can’t you just helped me a lot so thank you <3

Hopefully someone who knows can post.

But basically, (with my extremely limited knowledge of Verse) to get it into your map,
in the menu bar up top across from File, Edit, etc is Verse,
then select the Verse Explorer

Once it pops up on screen as a Tab Next to Outliner, right click on your project name and select Add New Verse File to Project.

On the screen that pops up, should be highlighted Verse Device on left, thats good, Rename it and hit the green Create Empty.

Double click on your new addition it in the Verse Explorer
You may have to go through installing Microsoft Visual Studio

Once you have Visual Studio Open copy and paste the Snippet to it and save

Close Studio and go to Verse menu up top and select Build Verse Code

Now it will appear in your Content Browser in maybe a new folder called CreativeDevices. Drag it onto your map and a Device that looks like a computer will appear.

Select that and you will see in the Details panel, elements that are the @editable bits in the script.

From there its a matter of working out what to do, by dragging things from your map into the slots like an elimination manager to the elimination manager slot.

Item Granter loaded with weapons used (it works by quickly swapping players empty weapon with a new full one)

The rest I’m a bit unsure of… the conditional button only has max 3 item slots, so I’m not sure if this is mean’t to be filled or left empty to latch onto the players held item slot ??

1 Like

Ur amazing, I’ve been trying the whole day by my own tho, but i couldnt do much more than creating files in verse without any knowledge hahah. I will try to use what u said to get what i was looking for.

The thing is that i dont really know if i have to make a codeline for each weapon, or what, but it’s fine. I guess the mechanism it’s just: A Conditional button for each weapon, an item granter who removes all the inventory, and then an item granter who grants the item that the conditional button compared ¿?. I don’t even know if that’s possible hahah.

Hopefully, someone who really knows, can explain it step by step. But im gratefull of what you said, thank you for your help fr. If you have any more idea i will be here to read them :slight_smile:

1 Like

did you find out how to make it work?

image

I use this setting on the “Team settings and inventory” device

1 Like

image

there’s also an island setting

1 Like

Ive got it working on my map - used a lot from that snippet, but its technically capable without it. All its doing is checking if you have X gun, if you do it takes it out of your inventory then gets placed back in. This works great unless you’re using modded chapter 5 weapons as this clears whatever mods you added. I had an option to turn it off but its a great function to have in your pocket. If you still need a hand I could walk you through it - very tedious.

Heres my map code if you wanna check it out and get an idea about how it works.

8224-0428-0858

1 Like

Hey, can you teach me how did you do it? i’ll add u on epic

1 Like

With the auto reload snippet? Its actually really simple.

Once you get a verse device and code copied in (if you need help with this theres a great comment from HardCawcanary or YT how to create a verse device)

Once you get the code in there, you’ll have to drag a conditional button, item remover and an item granter onto the map. Add the weapon of choice into said conditional button, same with the item remover and granter. Once all the items are in there go to the verse device (computer lookin thing) and in the settings it will have a trigger (Im pretty sure the stock code was a trigger) Pickwhip that to whatever trigger you want (usually its an elimination trigger ect) then open up the array and there should be a conditional button, item granter and you guessed it item remover which you will just pickwhip all to there respected devices. You can copy the devices, but you will have to add another array in the verse device (just by clicking the +) and pickwhip every one to their respected devices as well.

This is actually a really simple code, It pretty much just says - On trigger - Conditional button check - If yes remove item and grant it back -

This is very simple logic but will also prevent you from using modded weapons as it erased mods during this process.