Fortune Wheel
Unreal Engine Tutorial
Unreal Engine Tutorial
How to use?
Add to any of your widgets anywhere "W_FortuneWheel"
Attention: don't add "W_FortuneWheel" directly to the viewport, add only to the widget.
After you add it to your widget, its settings will become available to you.
Edges - adds borders to elements
SpinDurationSec - spin duration in seconds
Colors - the colors of the elements that will be automatically rotated
FortuneElements - your element (more on that later)
IsRandomizeElements - randomize elements once
IsRandomizeElementsStartSpin - randomize elements every time you spin
IsUsePercent - use drop chance (0-1 = 0-100%)
TextIconPadding - padding
IsHorizontalText - changes the text orientation
FontSize - font size
TextIconColor - default text and icon color
IsHandSpin - use if you need to trigger an event yourself (for example, you are counting the result in another place)
Index_AutoFill - element index (filled automatically) (used for manual element selection)
Text - the text of the element (description if icon) (if you need to move the line, then use /e/ code)
Percent - drop chance percentage (use with the "IsUsePercent" variable)
IsRewriteStyle - rewrite the default style
IsHorizontalText - changes the text orientation
FontIconSize - font or icon size
IsUseIcon - use an icon
Icon - icon
IsRewriteTextIcon - rewrite default color
TextIconColor - text or icon color
IsRewriteElementColor - rewrite the default element color
ElementColor - element color
IsRewriteAngle - rewrite angle
Angle - the angle of the icon or text
IsRewritePadding - rewrite padding
Padding - padding
Functions
Allows you to manually spin the fortune wheel.
Use if you want to bind another button or event.
Use if you need to select the desired element (for example: if your random function is located on the server or in another blueprint)
Attention: do not forget to check the box "IsHandSpin"
Sometimes you need to create a list yourself during the game, then use this function.
Events
If you click on "W_FortuneWheel" you will see that there are 3 events available to you.
OnSpinDynamicValue - returns the element immediately during spinning
OnSpinCompleted - returns the element that dropped out at the end
OnSpinStart - if you clicked on the fortune wheel, this event will be called
Additional Information
Sometimes you may need all the text settings, then open "W_Segment_Element" and select the text and adjust it.
If you need to adjust the size of the FortuneWheel, then simply use the following hierarchy SizeBox > ScaleBox > W_FortuneWheel and now you can easily resize the SizeBox.
If you need to change the default FortuneWheel angle from left to top, then just change it to Angle.
Still have questions?
If you have any questions, please write to me by mail: myalreadyday@gmail.com