BjornS's Recent Forum Activity

  • Thank you! "ef_variadic_parameters" did the trick

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you for the quick reply, I looked up RandomPlus and it seem to have the same "issue" that I. "RandomPlus.RandPlus" requires three parameters mandatory.

    It isn't a big issue the min and max value can be mandatory. But I am still curious if it possible to have a third party plugin with optional parameters like the random in System? Or is that only possible since it doesn't have an "edittime.js" (I can't find one)

    SysExps.prototype.random = function (ret, a, b)

    {

    // b not provided: random number from 0 to a

    if (b === undefined)

    {

    ret.set_float(Math.random() * a);

    }

    else

    {

    // Return random number between a and b

    ret.set_float(Math.random() * (b - a) + a);

    }

    };

  • Hi

    I'm making a plugin and want to have functionality equal to "random" in System plugin (mine is seeded). Where you can send in one or two params without using a default value. Is that possible to accomplish for a third party plugin?

    The problem is that Construct 2 says "Wrong number of parameters" trying to send in one.

BjornS's avatar

BjornS

Member since 8 Apr, 2015

None one is following BjornS yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies