GMLscripts.com

Discuss and collaborate on GML scripts
Invert

You are not logged in.

#1 2010-08-25 14:22:55

BlueMoonProductions
Member
Registered: 2010-08-25
Posts: 22

irandom_range_gm7

Hey,

In GM8 there is a function called irandom_range. This returns an integer(!) between argument0 and argument1. This (very small) script is exactly the same, so you can use it in GM7< as well:

Expandreturn floor(random(argument1-argument0+1))+argument0;

Last edited by BlueMoonProductions (2010-08-25 14:30:40)

Offline

#2 2010-08-25 22:35:31

xot
Administrator
Registered: 2007-08-18
Posts: 1,240

Re: irandom_range_gm7

Hi Blue, welcome to the forums.

Scripts looks good. Very handy function.


Abusing forum power since 1986.

Offline

Board footer

Powered by FluxBB