Lottery plugin to specify winning weight for Unreal Engine
Have you ever had trouble processing a lottery? This plugin allows you to draw lots according to the probability of winning.
- Prepare Lottery Data
- Preparing the lottery data as an index
- Preparing the lottery data as an object
- Draw lots !
First, prepare the lottery data in variables.
DrawLotsIndex to register only the probability of winning and get the index. There are two types of lottery data: DrawLotsObject, which registers the probability of winning and an object to draw the lottery.
- Add
DrawLotsIndexto the variable. - Compile.
- Add the required number of winning items to
DrawLotsIndexofDetails. - set the probability of winning.
- Add
DrawLotsObjectto the variable - Compile.
- Add the required number of winning items to
DrawLotsObjectinDetails. - Set the probability of winning.
- Set the winning items.
- create a node referring to Blueprint
- use function
DrawLotsIndexto draw the variableDrawLotsIndex- return the winning array number
- return
-1if the lottery cannot be drawn, e.g. if you set all probabilities to 0 - disable
consecutiveto prevent the same number from being drawn consecutively 1. use the variableDrawLotsIndex
- use function
DrawLotsObjectto draw the variableDrawLotsObject- return the winning item
- return
nullptrif the item cannot be drawn, e.g. if you set all probabilities to 0 - if consecutive is disabled, the same item will not be drawn consecutively


