RNG "summoning" ?

Mihe

Veteran
Veteran
Joined
Apr 16, 2014
Messages
193
Reaction score
71
First Language
English
Primarily Uses
RMMV
Is it possible to have an rng mechanic to produce new characters randomly? 


An example would be something like this: 
 

Yurii

Villager
Member
Joined
Apr 10, 2016
Messages
21
Reaction score
2
Primarily Uses
Of course, it is possible, although you will need to make a list of random characters beforehand, then create a function:


function getRandom(min, max)
{
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min + 1)) + min;
}


and apply the result of it where you want: either to data character ID, or event ID, or else
 
Last edited by a moderator:

Mihe

Veteran
Veteran
Joined
Apr 16, 2014
Messages
193
Reaction score
71
First Language
English
Primarily Uses
RMMV
Alright, thank you very much Yurii!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,040
Members
137,569
Latest member
Shtelsky
Top