[New/change of feature] Parametre renaming

0 favourites
  • 10 posts
From the Asset Store
Kids Game
$49 USD
New Sounds Added Update: 115 new sound effects added for no additional cost!
  • Hi I really like and use functions a lot. But it would be really nice if you were able to rename parametres so instead of them being called Parametre(0,1,2,3..etc)you could name them yourself.

    Since the function is added as a single object to the Whole project im not sure if thats possible.

    But a way it could work was kinda like dictionaries in the way they are added to a project. So each time you needed a function you just added a new function object. And you could add parametres to it like you would add variables to a normal object. Then you could name them what you wanted.

    Anyway if something like that is possible it would be great i think. Would most likely also solve the 25 limit parametre UI bug i think :D

  • +1

  • Yes, this would be lovely. It's a pain having to alias all the parameters in functions if you want things more readable.

  • Use global variables to setup like variable1 = 1 or "Easy" on parameters. It automatically applies all functions more than renaming each one.

  • I get the feeling that this would be tremendously difficult for scirra to implement.

    I once talked to someone about being able to use FunctionName(param0,param1) instead of Function.call("FunctionName",param0,param1) but apparently the engine architecture prevents this. I can only assume that your request may have similar problems.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmmm, my entire games are put into functions and I haven't had trouble yet. Though, it would be nice to have the function names as a constant global variable rather than a hardcoded value, but I hear at least that's being worked on.

    nimos100, and others, how many parameters do you typically use in your functions?

  • I want Functions to be based on the variables part of the engine along with allowed name spacing. I would love that sooo much.

    As it is now it's a pain in the lower back region, but I can still work with Function. Also I so much prefer having Function than not. So thanks still for having Function.

  • "@nimos100, and others, how many parameters do you typically use in your functions?"

    It varies a bit but normally not more than around 5-9, but are working on a game that are quite complex. And the items in it can have quite a few settings and different ones depending on which item it is. And therefore i original decided to just add all settings into a single item object. However due to the functions not being able to handle them all, i had to redesign the way it worked. This is not a huge problem, but was just the way i found out about the bug. So even though its not that big a deal, i thought i would just make them aware, so they could fix it if they feel like it.

    The renaming part of parameters i suggested because when you check parameters you might have several "Function.parametre(0,1,2,3,4,5,6) = 1 or 24 or whatever) But these doesnt tell exactly what ir is. And it would just be handy if it instead was "Function.Is_weapon(0) = 1" and so on. I do use globals in some cases especially if i use text for testing, as its easier to avoid mistypes that way. But having a lot of global variables can also be a bit annoying as the list when you need to use one can be quite long.

  • I believe you can name parameters with rexrainbow's function plugin.

  • PixelRebirth

    Using official function plugin please. The official one is more powerful then rex_function.

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