How do I Function Parameters

0 favourites
  • 4 posts
  • Hey there,

    I have been playing around with the Function plugin and it's a beautiful thing, haha. But, I came across two things that appear to mean the same thing. If you take a look at the screenshots below you'll see what I mean. There are two different ways of calling a parameter? What's the difference between the two?

  • When you are using "Compare parameter" (the event), you just have to entre the index of the parameter (0, or 1 or 2, or whatever parameter you want to compare to something).

    So if you set Index to 0, comparison to Equal, and Value to 1 for exemple, the condition will be true if the First parameter (it's zero based..) is equal to 1

    Function.Param(Index) however is the value of the parameter itself, which can be use in various ways inside the function (like inside a math formula, or to pick a particular instance of an object, or to return a particular result)

    In theory you could compare the value of a parameter by using System>Compare Two Values : Function.Param(0) is equal 1

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The first is a condition and used as any other type of comparison and the other is an expression and returns only the value of the specified index .

  • We must have submitted at the same time aphrodite

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