Weapon cycling

Hello everyone,

I’ve been trying to create a weapon cycling system for various characters.

I saw another thread about it here: Weapon swap - Development Discussion / Blueprint Visual Scripting - Unreal Engine Forums

However, it’s from 2014 so there are no images to follow along.

From what I’m understanding, the way to set it up would be to have an Enumeration, fill it out with the name of the weapons and optionally the description of it.

Afterwards, I would create an enu variable based off the one I just created earlier. And then get it. Afterwards, I’m not sure what am I supposed to do. Because based off what’s written I would need to make it an array, if I’m understanding it correctly?

That’s where I’m kind of lost right now. It’s what am I supposed to do after the enumeration is created.

So if you wanted to follow it the way it is in the thread, what they’re saying is to create an Enum, set those values, and then you will have a variable of that type in your class.

You won’t make it an array as in this case it’s basically a representation of your current weapon.

When you use mouse wheel up, or press a key (like 1-5), you’re changing that enum. 1-5 is really easy as you’d just set the enum to be one of the weapons values. For the mouse wheel up, as they suggest, you want to add +1 to that enum every time mouse wheel up is pressed, but if it’s at 5 and it’s going to be 6, you want to set it to 0. The reverse would be true if it was at 0 and you hit mouse wheel down, it would be going to -1 but you would set it to 5.

Obviously this is just an enum and you still have to set up weapons etc which is lots more work

Hey, sorry for the late response! Thank you for your answer! I got it working now, I don’t know why but I was overthinking it, the solution was rather simple…