top of page

Oxidane

PSEUDO CODE for How to get Randomized Fish within a given percentage:

 

Loop the PercentageAmountNum of the FishArray[], generate a random number within FishArray[].Length, do a check if the random number has already been picked(Figure 2), if it has, generate another number else add the random number to the RandomizedArrayRef[] and then do the next loop. Now that I have the RandomizedArrayRef[] I can do whatever is needed with these selected fish; in this case I am manipulating the individual fish speed.

(Zoom in and out using Mousewheel) If you zoomed out too far and cant see click the X Y Icon or the link below to see.

Figure 2. Check function to see if Index is already picked return boolean. https://blueprintue.com/blueprint/k9z9g72z/

bottom of page