Original Source
- Original title: [TF] Random Number Generator
- Original author: Tagflag
- Original date: November 30, 2015
- Source thread: https://forums.rpgmakerweb.com/threads/tf-random-number-generator.51878/
- Source forum path: Game Development Engines > RPG Maker Javascript Plugins > JS Plugin Releases (RMMV)
Summary
TF_RandomNumberGenerator v1.0.0 by Tagflag About this plugin
Archived First Post
by Tagflag
About this plugin
This plugin creates a random number and stores it into a in-game variable.
You can also call the wait command to use variables (like a random one).
So you can combine both functions to let birds sing at random intervals.
You get a random number based on min-max values, remember min and max values are included that means that a random value between 5 and 10 can be:
5, 6, 7, 8, 9 or 10.
How to Use
Use as plugin commands in events:
TF_RandomNumber x y zx = min, y = max, z = variable id to store the random number example: TF_RandomNumber 5 10 2
this stores a random number between 5 and 10 (example: 7) in variable id 2 you then can access the variable with the escape sequence: \V[2]
TF_Wait variable_idJust replace variable_id with variable number, example: TF_Wait 2
ececutes the wait command for variables's value in frames.
Demo
Here is a example project, best you open it in RPG Maker and look at it (after you played it first if course ).
It's very short < 1 minute. File size: ~ 20MB
http://www.mediafire.com/download/xeci2qaiorqgetg/RandomNumberExample.rar
Script
You can download the plugin here:
http://www.mediafire.com/view/0jadyb3a3cp9v3t/TF_RandomNumberGenerator.js
Legal stuff
You can use this plugin in commercial and non-commercial projects.
You are free to duplicate, distribute and modify this plugin however you want.
To give credits to me is optional.
In case of ditribution: don't claim to be the creator of this script. f you modified it, leave my name in the plugin ("@ author:" you can change of course).
If you use it in a game, then it would be nice if you tell me about it. I would love to try it
FAQ
Q: Will "TF_RandomNumber" also work with only 2 argument, like "TF_RandomNumber x y"?
A: No, it has to be 3, otherwise it will get ignored. If you have more arguments (like 4), then it will work but only use the first 3.
Q: Why no screenshots?
A: There is nothing much to show.
Q: Will you add more to this plugin?
A: Yes, there are still a few things I want to add/change.
Q: Are the commands like "TF_RandomNumber" case-sensitive?
A: No, you can even write "tF_RaNdOm_NuMbEr" if you have the time
Q: Why do you add TF infront your plugin name?
A: So I can find it in my plugins list, you can change this plugins file name without breaking it.
Extra Notes
If you have questions/problems, find erros/typos or have praise/complaints then let me know! I answer everything I can.
Downloads / Referenced Files
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadLicense / Terms Note
You can use this plugin in commercial and non-commercial projects. You are free to duplicate, distribute and modify this plugin however you want. To give credits to me is optional. In case of ditribution: don't claim to be the creator of this script. f you modified it, leave my name in the plugin ("@ author:" you can change of course).
Creator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
Topic Summary
Loading summary...