The new functions are awesome!

0 favourites
  • 13 posts
From the Asset Store
40 Seamless textures for tile backgrounds. High resolution 1024x1024!
  • I just saw the new video about built-in functions. I can't wait to use them. If you haven't seen the video, check it out.

    youtube.com/watch

    I would love to be able to put a sprite as a parameter or other objects as parameters. Currently you can do this with families, however, it can get a little messy. The reason is that occasionally you want to do the same thing to different objects in different families. I find I do have this problem where I have different objects with different behaviors.

    If I parameter could be a sprite then you could have a complex series of actions and simply pass a sprite in a function.

    It would save a lot of time if we could do this.

    Just a suggestion.

  • I would love to be able to put a sprite as a parameter or other objects as parameters.

    The standard approach at the moment is to pass an object's UID, and pick it in the function again.

  • It would be a bit more user-friendly if you could type in the sprite name and see an icon of the sprite.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley

    I Just saw the Built-in functions video - very exciting changes! Naming the parameters will be tremendously helpful.

    I use a lot of functions (sometimes with many parameters) - and I LOVE being able to collapse everything done to the minimum, so that the event sheet is almost like an index. Then when I am working on something, I only expand the functions that are relevant. That keeps everything else hidden so I can focus on the task at hand.

    So, it would be really nice if there could be an option to hide the parameters when the function is collapsed. Or maybe have them listed on the same line, after the function name.

    * sample of a game with hundreds of events, bust still able to fit on one screen:

  • This is a great development, also noticed bezier spline paths/smart waypoints is also in development !

    C3 just keeps getting better..

  • Yes, this is indeed awesome af. I hope it´s relatively easy to switch over/convert from the old functions to the new one.

  • Great feature, can't wait to use it!

    Ashley, could you make it so that function parameters are displayed with their default values? For example, display "number playerScore=0", instead of just "number playerScore".

    Also, do I understand correctly that the default value for each parameter will be automatically suggested when you are adding an action or expression to call this function?

    Will it be possible to omit parameters when calling a function, if you want to use their default values? Or maybe hide parameters with default values on the event sheet. This will make function calls shorter and easier to read.

  • Ashley is it possible to have multiple return values, also to name those as well?

  • This is a complex feature that isn't even finished yet. I'm afraid it's too soon to start taking suggestions to take it further. Additionally as usual once it's out any suggestions should be posted to the suggestions platform, since as usual we get far more suggestions than it is remotely practical to implement, so the voting system is a way of helping prioritise everything.

  • is it possible to have multiple return values, also to name those as well?

    mOOnpunk Say, you have a function that returns player health, player speed and player name. So how are you supposed to call this function in an expression?

    If you need a function to "return" multiple values, you can do this by writing them to global variables, or to an array/dictionary, or put all values into a single string (comma-separated for example).

  • Next to a typed event sheet interface, this is one of the most exciting features I’ve wanted in C3.

    I really hope we’ll be able to dictate parameters as optiona

  • Can I put a break point in the function? I also assume if I pass an integer to a string variable it stops me, or does it convert the integer to a string?

  • Can I put a break point in the function? I also assume if I pass an integer to a string variable it stops me, or does it convert the integer to a string?

    I believe it will not work or will prompt an alert that you can't parse it. Data types aren't automatically converted in construct, as far I can remember right now, this has always been this way. I might be wrong though

    By the way, This new function is a game change feature regarding to organization, letting bigger projects be way more readable. I wish we could do something to increase scirra's team to get updates faster. Construct would be a "monster" if scirra had a bigger team.

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