How do I use 'on return value' in function?

  • Hello all,

    Can anyone give me an example on how the 'on return value' can be used usefully?. I mean I generally use functions to just call events with different parameters. I've never used the 'call expression' or 'on return value' . So how can I make use of these?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Call expression is only useful if you have enough parameter that the classic call function cannot keep up with them (I know at a high number of parameters, the window just cannot go larger, even though in most cases it is just not needed).

    When you set a return value, it will basically be the value used when you are using Function.Call in an expression, for exemple, lets imagine..

    Global variable Number = 3

    On function "double", return value: 2*function.param(0)

    On start of layout:

    Set Number to Function.Call("double", Number)

    Number will be equal to 6 after the layout starts once.

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