[Request] Auto-complete in the function object

0 favourites
  • 12 posts
From the Asset Store
Create your own Behaviors in Construct 3 using events! Custom Expressions, Signals & Triggers Behavior Addon Pack
  • One of the things I love the most about Construct 2 is the function object. It allows me to define my own functions and call them from any sheet. I use the function object more than any other object in construct. On top of that it allows me to work more OO keeping responsibilities where they belong.

    There is only 1 downside to the function object: if you make a spelling mistake, nothing will happen and the game doesn't give you an error.

    Having Auto-complete in function would be perfect to solve this issue, as well as stimulate a more structured event sheet. Right now I use "object.functionName" on many event sheets and having auto-complete after I type an object with all the functions matching that name would really make my day.

  • +1

    I would love this too. For now I'm stuck creating global variables with the same name so they show up in intellisense. Granted considering the number of functions my project has I would like to add that if this ever gets added to the IDE to nest it in a global param like fn.functionName so that way all my functions don't show up in the menu by default and clutter the list.

  • +1

    I would love this too. For now I'm stuck creating global variables with the same name so they show up in intellisense

    That's not a bad workaround, thanks for the tip.

  • No,C2 = very very easy to coding

    for me,i don't need this

    but I hope to get CTRL+H Replace Function

  • I've requested functions to be a primitve rather than a plugin. As a primitive then they would get the auto correction. however that's not the case. if you need a fix for now.... sigh. I've done this before.

    --------

    Object.YourFunctionVar = "foo"

    --------

    --------

    Function.OnCall( "foo" )

    --------

    Function.Call( object.YourFunctionVar )

    Under this model you only need to actually spell your function 2 times. Once for the OnFunctionCall and the other in the object variable that holds the string. For some reason you can't do

    Function.OnCall( object.YourFunctionVar )

    makes me a sad panda.

  • Although I will say the one saving grace about functions is they are the only true dynamically referable object (Called by String) in C2.. with out that functionality I wouldn't be able to create a game engine (Processor that calls a threaded function stack) or call functions across device in multipliplayer. If they can make the function names show up in intellisense with out losing the dynamic reference I would be a very happy panda

  • Try Construct 3

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

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

    I agree with you, but I fear this would kill the dynamic properties of function, such as project wide referencing without including an event sheet. There has to be some middle ground though.

  • I honestly have no idea how Ashley could make intelisense for function object but it would be golden improvement.

    Thats literally biggest chokepoint to create games with less time than now. And to make bigger games.

  • I've requested functions to be a primitve rather than a plugin. As a primitive then they would get the auto correction. however that's not the case. if you need a fix for now.... sigh. I've done this before.

    --------

    Object.YourFunctionVar = "foo"

    --------

    --------

    Function.OnCall( "foo" )

    --------

    Function.Call( object.YourFunctionVar )

    Under this model you only need to actually spell your function 2 times. Once for the OnFunctionCall and the other in the object variable that holds the string. For some reason you can't do

    Function.OnCall( object.YourFunctionVar )

    makes me a sad panda.

    What do you mean by "being a primitive"?How would that work?

  • FunctionséMethods in other languages are defined objects simlar to int/string/float etc.

    So instead of Adding the object Function.

    You would rightclick or add a new variable. But instead it would be adding a "group" with defined paramaters. normal programming languges don't have a Function plugin. It's a core element to programming.

    So when you need to acess the Function it would be part of the system speficication. Similar to how variables are in the system root when you need to spell them.

  • FunctionséMethods in other languages are defined objects simlar to int/string/float etc.

    So instead of Adding the object Function.

    You would rightclick or add a new variable. But instead it would be adding a "group" with defined paramaters. normal programming languges don't have a Function plugin. It's a core element to programming.

    So when you need to acess the Function it would be part of the system speficication. Similar to how variables are in the system root when you need to spell them.

    I'm pretty sure it would be more confusing (as you would still have to use events inside it to define it), so I don't see much advantages here, it ca neven remove the fact you can have one function do different things depending on the level or event sheet, but that is besides the point.

  • The change is mostly in embedding function calls in an inline expression. Functions offer abstracting in OO design. abtracting allows for more modular and re-usable code. Now it's possible to do so now. But there is more overhead and less type sage.

    As an example and this is just an example.

    x = Function.Call("foo",object. y) == z ? Function.Call("loo", object.y) : Function.Call("boo", object.y)

    where as in other languages

    x = foo(object.y) == z ? loo(object.y) : boo(object.y)

    I also now get the benefit on the auto correct spelling. The below sample has a spelling mistake.

    x = Function.Call("foo", object.y) == z ? Function.Call("Ioo", object.y) : Function.Call("boo", object.y)

    So it doesn't add functionality. It just makes programming easier and more convient. That's why I've never made large post specifically for this. I've just added it to the "What you want from c2" threads.

    Also if Functions were a primitive or even based on Group. Then it would be easier for C2 CAPX work as a modular CAPX. Where as if Ashley ever designs modular self contained util capx. Then Ashley needs to add another Function comparible capability which is then just re-inventing the wheel.

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