[suggestion] Function and parameters

0 favourites
  • 2 posts
  • I like to use functions. I also like to make them independent of global variables. Hence I use parameters. However, the current system with functions is primitive and highly confusing when you are dealing with up to 3 parameters only distinguishable by their number.

    Would it be possible to map the parameters to local variables?

    I am doing this manually now but it makes my code look messy and I am not 100% sure what the order of execution is.

    I would suggest that during function construction you could set up the expected parameter variables and their type. Then the function would automatically assign those parameters to the variables which then act as local variables.

    That would make functions even more powerful and reusable.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I agree that being able to have named paramaters would make it easier. I don't see it being more powerful.

    Though I would love to see instead functions being able to be called without the the Function.Call("") requirement. But instead be used like a nomral function. so instead of

    Function.Call("myfoo", "blah")



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