RPG Maker Forums

I am currently having an issue with the math.random function in mv, it will only return 0s. I am using Math.floor(Math.random(10)) +1 in an attempt to make something work 1 in 10 times however it will only return a 1, if I remove everything but Math.random it will return 0.xxx but never a number above 0. Am I misunderstanding the use of this function? Is there some way around this or another function I can use to get a random result?


Edit: thank you that worked.

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,038
Messages
1,018,466
Members
137,821
Latest member
Capterson
Top