[Request] Auto-complete in the function object

Discussion and feedback on Construct 2

Post » Thu Jun 12, 2014 3:31 pm

jayderyu wrote: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.
Game design is all about decomposing the core of your game so it becomes simple instructions.
Posts: 2,122
Reputation: 17,123

Post » Thu Jun 12, 2014 11:09 pm

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.
Posts: 2,455
Reputation: 15,028


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 30 guests