Functions Feature Needed

Discussion and feedback on Construct 2

Post » Wed Sep 10, 2014 5:26 pm

Functions needs to actually store and "know" the current list of function.

A current workaround is to create an object that stores function names in text instance variables. When you want to call a function you enter that object.shortcut name for function. I was thinking, why not allow the function to store and know the names of its own functions.
Image
B
33
S
11
G
2
Posts: 564
Reputation: 5,153

Post » Wed Sep 10, 2014 11:04 pm

This would be my all time favorite update so far. I love using functions...hate keeping track of them all.
B
42
S
18
G
8
Posts: 495
Reputation: 8,410

Post » Thu Sep 11, 2014 2:35 am

I requisted Functions to be a primitive similar to variabls. That way they apear int he auto filler.

So instead of
Function.Call( object.functionName, a, b, c)
you would get
functionName( a, b ,c )

just like a real function :)
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,018

Post » Thu Sep 11, 2014 2:43 am

Yes please!!! i get lost on all my functions... and needing to remeber the name when calling one...
B
23
S
6
G
3
Posts: 316
Reputation: 3,461

Post » Thu Sep 11, 2014 3:52 am

Lunatrap wrote:Yes please!!! i get lost on all my functions... and needing to remeber the name when calling one...


You will always have to remember your function names to call them, no matter what :) But I know what you mean.
Until there's a better solution, I do:

Global constant text FN_SOME_FUNC = "SomeFunc"
Global constant text FN_ANOTHER_FUNC = "AnotherFunc"

---------------------------

Function: Call FN_SOME_FUNC( x, y, z)
Function: Call FN_ANOTHER_FUNC( "Hello")

---------------------------

And never have to remember another function's spelling, and they appear together in the drop-down.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Thu Sep 11, 2014 7:50 am

@codah that's a neat idea, actually, I think I might adopt that practice.

I'm all in favour of requests that improve workflow, so I'll definitely throw in my +1 for this suggestion (and @jayderyu 's, while we're at it). Functions should always be ready to go, anyway - having to create a "function object" has always seemed a little odd to me.

I'd go as far as to say that functions should have their own window, like bookmarks, for easy access and reference. I've suggested the same thing with global variables in the past, as I really do think these windows are a great way to keep track of important info.
B
57
S
15
G
11
Posts: 912
Reputation: 12,606

Post » Thu Sep 11, 2014 8:45 am

+1 a good suggestion!
B
37
S
11
G
1
Posts: 80
Reputation: 3,325

Post » Thu Sep 11, 2014 8:58 am

This is a good idea. Namable parameters as well please. I know theres a third party plugin that does this but i think it should be standard feature.
B
43
S
23
G
20
Posts: 735
Reputation: 12,027

Post » Thu Sep 11, 2014 9:23 am

Great idea ^_^

It would be very useful and time saving.
B
28
S
3
G
1
Posts: 29
Reputation: 1,698

Post » Thu Sep 11, 2014 9:25 am

jayderyu wrote:I requisted Functions to be a primitive similar to variabls. That way they apear int he auto filler.

So instead of
Function.Call( object.functionName, a, b, c)
you would get
functionName( a, b ,c )

just like a real function :)


If you think about it that doesn't really fit into the current way of doing things. I'm thinking you'd need to do something like

System: Call Function functionName(a, b, c)

and 'functionName' would have to be a Function 'type', and they would appear in the drop down list much like Object types in the System:Create Object dialog.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Next

Return to Construct 2 General

Who is online

Users browsing this forum: kiki4construct and 4 guests