Arbitrary parameter count for Conditions and Actions?

  • Is there a good way to make Conditions and Actions that take an arbitrary number of arguments?

    I notice that the Function object uses

    AddVariadicParams()

    to do this, but when I searched the forums, I only found one post on the topic explaining that it sort of a hack, built specifically for the Function object. Granted the post was from a few years ago so I don't know if AddVariadicParams has changed since then.

    The best work around I've found other than that is to provide a single do-nothing parameter, from which you can call an expression that has the side effect of passing its variable arguments into an array behind the scenes, which can then be used by the Actions or Condition.

    Any thoughts or suggestions welcome.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I had used this feature in my plugin, but it would not work in behavior. Or you might make a "push action" to do the same thing.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)