Random function HOW TO

Forums General Discussion Random function HOW TO

Tagged: ,

This topic contains 1 reply, has 2 voices, and was last updated by  Gavalakis 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #2215

    marek dyjor

    Flowcanvas id very fine produkt but manual is a joke!. How to use Random function… I dont see aby way to do it. There is only randomitem. Funy think in manual thay use random function but Im not able to find how to do it.




    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:

    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.


    You must be logged in to view attached files.
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.