War for the Overworld

War for the Overworld

Discover and conquer new realms!
Looking for new realms to subjugate? Peruse the cavernous depths of the Workshop to find the next map upon which to sate your bloodlust or create your own and share via the in-game editor!
了解更多
roysten712 17 2020 年 4 月 13 日 上午 7:58
Random numbers in Mighty Script
I have been using random numbers in the scripts function to trigger certain outcomes in the level that I'm creating.

I create a number with an initial value of 0, then in the script I trigger a random number event which gives the number a value between a series of integer values, say 1, 2 and 3. When actually running the game certain numbers never come out, so 1 and 2 would come out, but never 3. Conversely I have another number event where 3, 4, 5 or 6 should be chosen, in this event 4, 5 and 6 appear, but never 3.

I find this quite bizarre. Has anyone else experienced this? Does anyone have any advice? I can provide more details on the exact events used it needed.
< >
正在显示第 1 - 3 条,共 3 条留言
Korvek 117 2020 年 4 月 16 日 下午 6:47 
Yes. I had this too and ended up just accepting it as a bug. I have ticketed it already.
roysten712 17 2020 年 4 月 18 日 上午 1:59 
I'm glad it's recognised and ticketed, hopefully in the next patch we'll get a fix. Tried any good work around? It has been suggested to me that I expand my list of numbers so it then includes one more than the actual range I want.
Korvek 117 2020 年 4 月 18 日 上午 6:24 
Well, for me it was always the highest number rather than number 3. E.G. If I had a script pick between 1 and 2, it would always pick 1. If between 1, 2, and 3, it would pick between 1 and 2. My workaround was to add one number extra (so if I only wanted three numbers, I would make four). As has already been suggested, I would add just one extra as well. If you are having problem with number 3 only then just add one extra number and rescript it to substitute it. E.G. If you want 5 numbers, make 6 with possibilities 1, 2, 4, 5, and 6.
< >
正在显示第 1 - 3 条,共 3 条留言
每页显示数: 1530 50