Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / when using random() can i still use a step?

Author
Message
dandrews
3
Years of Service
User Offline
Joined: 26th Jun 2020
Location:
Posted: 9th Oct 2022 21:20
im trying to give a gun a random damage number from its min dmg to its max dmg but would like to keep the increments at a certain number. i know to use this with for loops but i cant get it to work with the random() option

Steve Ancell
18
Years of Service
User Offline
Joined: 16th Feb 2006
Location: Brighton, East Sussex, UK
Posted: 9th Oct 2022 22:09
Step isn't used that way, it's for use as part of a For/Next loop.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 9th Oct 2022 22:16
openedeggdmg = random2(mindmg/Guntype[r].dmgperlvl, maxdmg/Guntype[r].dmgperlvl) * Guntype[r].dmgperlvl
dandrews
3
Years of Service
User Offline
Joined: 26th Jun 2020
Location:
Posted: 10th Oct 2022 03:39 Edited at: 10th Oct 2022 03:41
thank you all i ended up using a formula similar to blinks suggestion. every 10 levels the rarity increases.

Login to post a reply

Server time is: 2024-04-25 00:23:54
Your offset time is: 2024-04-25 00:23:54