I’m currently a game that allows player to switch their weapons before the start of the game, I want to do a item wheel that scrolls down when ever the player press up on the d-pad. I’m currently stuck on how to modify which widget to show at the widget blueprint where I have a widget switcher, so how do I modify which widget to show from a game controller?
Idea:
Game Controller blueprint:
Ship and Weapon Selection Widget:
Is there a way for me to modify the active widget index, like binding it to a value.
Update:
I cant seems to cast to the scroll bar in the Ship And Weapon Selection Widget to modify the value
Widget animation should do the trick, the only issue I think you will face is having the top and bottom ones fade.
I believe I have heard people fading widgets, but no clue how it is done or sure if possible.
If you have an image of all of weapons, set up, let us say 5 Image widgets.
You could then have a BP that gets all 5 images, when they hit the down button, scroll it down When finished scrolling, button 2 is now button 3 and button 5 is now button 1.
Hope this makes sense?
At the bottom of the widget BP.
What you need to do is create three scroll boxes side by side and add child widgets to them for the items you want to display. You should also hide the scroll bar that would show up. You can fade top and bottom ones by applying an overlay or setting brush colour/opacity. The multiplayer shootout example that can be downloaded in the learn tab of the launcher has an example of stacking children widgets in scrollboxes (servers in a list).
I wouldn’t advise using widget animations unless you know how to manipulate their play speed. It would be much safer to tie the rotation to a float variable for rotation angle for later comparison (e.g. It shows the banana now, because the rotation angle is 30 degrees). Then based on this variable, you can rotate items by incrementing it. It would require modifying the z order, render translations and perhaps vertical scales of items.
This probably sounds confusing, but you should be able to figure it out after enough experimentation.
I know this sounds confusing but you should get the idea after enough experimentation.
I get what you mean but how do I get the 5 images
How do I scroll them using my gamepad down button? Like how do I link my game controller buttons to scroll the scrollbox. Like dpad down button
It is in this tutorial somewhere, I tried to scan through but could not locate it. You can see it in the first video.,
I am going to check that out myself.
Cheers
Does anyone know how to stimulate a scrolling using a input from a controller from player controller? I also cant seems to call the scroll box from the player controller