Reply To: Random function HOW TO

FlowCanvas Forums Support Random function HOW TO Reply To: Random function HOW TO

#2220
Gavalakis
Keymaster

Hello,

Since FlowCanvas is using reflection to be able to use any Unity (and other) existing code API, it would be practically impossible to document every single function/property and how they work. If by “random” you are refering to the function for generating a random number, then you need to use the “Range” function of the “Random” class. Simply open up the node browser (with spacebar key for example) and search for “random range”.
There will be two results, one that accepts floats and another that accepts integers. Choose either node to add (float-based is more flexible).

Then you will be able to do something like this for example:
RandomRange

In the above example, when in-game you press down the left mouse button, a random number between 0 (min) and 10 (max) will be loged to the console.

Thanks.

Join us on Discord: https://discord.gg/97q2Rjh

Attachments:
  1. RandomRange.png