Info

Statistics

  • Download count1,479 total downloads
  • Latest download count 625 downloads of latest version
  • Average download count1 downloads per day average

Owners

Description

This plugin generates non-repeating integers within a given range, and will cycle with a given threshold to not repeat within that threshold.

Example Files

Discussion

  • 17 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • Since there seems to be some limitations to the advanced random that is built into C3, is this Addon still working with the newer C3 versions (r336+)?

  • If we have tag feature, it will be more useful when u use this plugin for internal loops. SmartRandom.Next("TAG")

    • AdvancedRandom pretty much replaces this now, so I won't be making improvements. You can add additional copies, so it's possible to handle multiples now already.

  • 1.2 fixes the minification issue.

  • There is an error when I try to export in C3 build with minification (even with your demo project):

    /str/c3runtime.js:2757:4: ERROR - [JSC_REFERENCE_BEFORE_DECLARE_ERROR] Illegal variable reference before declaration: C3

    2757| C3.Plugins.BHT_Smart_Random.Acts =

  • You would want 4 instances, with a range of 1 to 40, if you want to pull cards from each category. Then you pull 4 cards from each instance. The threshold doesn't apply as you'd want to stop at 40 cards pulled, for each deck.

  • I Tried to use the plugin to pull a card out of 40 available from 4 different categories (so total is 160 cards).

    It doesnt seems to work the way I was excepting as if I just do a test with 4 cards in each category, the same card eventually come back again when I choose start:1, end:4, threshold:4 before other cards was pulled.

    Should I have 4 time each the same plugin in the project (one for each category) to solve this problem?

  • luckyrawatlucky

    No, I don't support that, and don't see the need to do so. Just use a function to get the next value, and if it is '8', skip it and get the next number.

  • What if I want to skip a number between a range

    Example

    I random range is 1-15 but i don't want to 8 to be appear.

    is this possible ?

    if not can we have a feature like this, So we can skip some numbers from range that we don't want appear.

  • Thank you that was awesome and quite simple to use.

  • Fib, people were constantly asking how to do this. It seemed an obvious solution.

  • Load more comments (3 replies)