Bug Reporting > PlayMaker Bug Reporting
Randomize Bug[SOLVED]
(1/1)
ch1ky3n:
Hey All,
I encountered a small problem while updating the PMaker to the latest version. It is the new randomize action that features No Repeat. By default, it is ON/checked. While my state took variables of min and max from my database, there is a case where the min and the max difference is only 1 (Min 3 and Max 4). This will cause a bug and cost Unity to freeze. I wonder if this is a good report for you guys!
Thank You
jeanfabre:
Hi,
Yep, thanks for reporting this.
which action exactly? I'll try to repro and escaladate a bug report.
feel free to report on this via the PlayMaker bug report, We always welcome your input when you find issues.
Bye,
Jean
ch1ky3n:
I believe it is Randomize int
The “No Repeat” box is checked by default and could cause unity to freeze when the difference between min value and max value is 1
Like
Min 3
Max 4
jeanfabre:
Hi,
good catch, Trying to find the issue at the moment.
Bye,
Jean
jeanfabre:
Hi,
Well, the problem is that if your min and max difference is 1 and you haven't checked "inclusive Max", then yes you have an issue if you don't want no repeat in the randomization.
to fix the action ( while we push an update for the fix to be official)
replace line 52 of RandomInt to:
--- Code: ---if (noRepeat.Value && max.Value != min.Value && (!inclusiveMax && (Mathf.Abs (max.Value - min.Value) > 1) ))
--- End code ---
Bye,
Jean
Navigation
[0] Message Index
Go to full version