ANNOUNCEMENT: Show your interest in a RPGAIO Live Stream Q & A Event! Click Here!

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Random number nodes
#1
Here are a couple more nodes that produce a Random Int or Random Float and add the value to another node.


Important: You need to change the file extensions to ".cs" (I had to upload them with the extension ".txt" because ".cs" files are not accepted)

Caution
These nodes should not have any side-effects but just in case you should backup your GameData file before using them
If something does go wrong, delete the new node files from your project and restore your GameData backup.

Random Float
Outputs a random Float value between the min and max, and adds it to the target node value
   

Random Int
Same as above except it produces an Integer instead of a float.
   



How To Install
You can install these nodes by placing the class files in your project.
In my case I created a new folder called 'Custom' in this location: Assets/RPGAIO/Scripts/RPGMaker/Nodes/Custom
You can put them somewhere else if you like ... but I didn't test it.

*Don't forget to change the extension*
   


Attached Files
.txt   RandomFloatNode.txt (Size: 1.36 KB / Downloads: 3)
.txt   RandomIntNode.txt (Size: 1.36 KB / Downloads: 3)
Reply
#2
very usefull, thanks a lot
Reply
#3
This is as opposed to the current true false random node?
Reply
#4
(10-12-2018, 08:50 AM)Wrofir Wrote: This is as opposed to the current true false random node?

Yes, these two nodes both output a value in the range Min-Max and add it to the Target node variable.

The default random node does not output the actual random value but instead follows a True or False path based on the comparison result.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)