Hiding functions parameters

0 favourites
  • 10 posts
From the Asset Store
Make your game more fun and interactive with the Dog Hide and Seek Buttons Sprite Sheet.
  • Hello,

    It is possible to hide the built-in function parameters from view, to make the function event blocks less heavy on the editor ?

    I used to have lists of functions with the previous function object that was easily manageable with only the function name appearing at the top event.

    Thanks

  • Doesn't look like it. That seems like a fairly simple suggestion to implement to me though.

    Although I'm more concerned about why your functions have so many parameters that this would be a problem in the first place... I think you would normally want as few parameters as possible. If you've got over 3 or 4 parameters, your function is probably trying to do too much and could use some refactoring.

  • oosyrag

    Some functions have 4-6 parameters, like creating something at runtime by passing name, x,y coordinates, angle, size, some informations.

    Are you talking about performance or code readability ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Mostly readability, there's nothing particularly wrong with having a lot of paramaters, just seems odd that it would be a problem, to me.

    One thing that might help reduce clutter is to use event sheet includes, maybe keep your functions on separate sheets.

  • I used to have hundreds of functions for triggering effects, requesting commands and running ai states. These are already in separate events sheets called via includes, with at least 20 functions per sheet. Having functions displayed as a list without each paramaters name would be easier to read through, as parameters mostly only matter when editing the function core, I think.

    I just did a suggestion here : https://construct3-21h2.ideas.aha.io/ideas/C321H2-I-497

  • This definitely should be an optional setting if implemented. Because I actually need the opposite - being able to see the names of function parameters when the function is called in an expression. Currently they are displayed like this:

    Function.getDamage(5,2,0)

    What I need is this:

    Function.getDamage(Attack: 5, Armor: 2, Shield: 0)

  • I just did a suggestion here : https://construct3-21h2.ideas.aha.io/ideas/C321H2-I-497

    I've given what votes I could spare to this!

    I also added a proposal for a function-level version, I think it would be more flexible to control this for each function, rather than a blanket system-wide setting. This image is an example:

    .

    Having a little drop-down icon in the function event could let you show/hide the parameters at will (like how it's done for layer effects in photoshop).

    And I definitely vote for the dop2000's other idea, about seeing the paramters in-line when called!

  • brushfe, thanks for your image.

    dop2000, of course you're right. I follow you on having the parameters displayed is the inline call.

  • brushfe, do you allow me to take your image to illustrate and clarify the presentation on the suggestion platform post ?

  • Sure thing, if it helps!

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