New Function Update

Discussion and feedback on Construct 2

Post » Mon Oct 20, 2014 8:18 pm

@Ashley - Thank you so much for addressing our needs with the function name calling update you made to the latest beta version. It solves a VERY LARGE head ache with respect time spent debugging due to miss typed function names. The editime action "AddFunctionNameParam" is an easy update to make to my current custom plugins that currently incorporate the function plugin so thank you for that as well. I'm sure it wasn't easy.

It does however leave one missing piece out I hope you will be able to update later on in the future which is that when I am going through and changing my naming conventions (IE I decide to change an "On function" name) it does not fix the all locations in the event actions where i have called it so i still have to do that manually. I know by the way the function plugin works this might not even be possible as it probably requires a string search/replace in the xml file? But if you can look into it and let us know or make this happen it would make the function plugin absolutely solid!

As always thank you for your hard work. Its appreciated greatly!
B
20
S
7
G
1
Posts: 221
Reputation: 2,077

Post » Mon Oct 20, 2014 8:23 pm

All other requests not withstanding, I'd like to continue from the comment I just left on r185:

...you, thank you, thank you, thank you, thank...
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Mon Oct 20, 2014 8:35 pm

It would be great that when you change the name of a function C2 renames all the calls to that function with the new name, just like the objects and variables.
B
93
S
31
G
11
Posts: 654
Reputation: 11,832

Post » Tue Oct 21, 2014 5:55 pm

Iolva wrote:It would be great that when you change the name of a function C2 renames all the calls to that function with the new name, just like the objects and variables.

That would be wonderful, but don't think the drag and drop style of programming is global and updates if anything else is updated. Could be wrong though.
Working on a Action RPG
B
8
S
4
G
4
Posts: 18
Reputation: 2,734

Post » Tue Oct 21, 2014 7:46 pm

Rukiri wrote:
Iolva wrote:It would be great that when you change the name of a function C2 renames all the calls to that function with the new name, just like the objects and variables.

That would be wonderful, but don't think the drag and drop style of programming is global and updates if anything else is updated. Could be wrong though.


Actually Objects names, variable names, behaviour names, families names, instances variable names, and all that actually are cross referenced, so if the reference changes (the name of the variable or object or behaviour), all adapt accordingly (C2 would be much weaker if it was not the case IMO)

Only string based reference (like animation names, effect names, groups names, function names, etc..) dont update if the original name change (since you could have 2 functions with the same name in theory, it sort of make sense even though that could be done maybe, but for groups however, a cross referencing would be nice to have since 2 groups cannot have the same name).
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
54
S
22
G
18
Posts: 2,123
Reputation: 17,150

Post » Tue Oct 21, 2014 9:20 pm

But I only mean that when you change:

-The function name on the "On Function" event
Image

C2 changes for you all the:
-The action: "Call function"
Image

It will be awesome!
B
93
S
31
G
11
Posts: 654
Reputation: 11,832

Post » Wed Oct 22, 2014 12:04 pm

Renaming is tricky, particularly if you call functions based on expressions. For example if you have functions "Func1" and "Func2", and somewhere you call function "Func" & number, then rename them both to "Other1" and "Other2", then C2 cannot realistically know to update every call action, so it's still broken.

One workaround I saw someone using was to use constant global variables as the function name. If you rename a global variable in C2, it updates the name everywhere in the project.
Scirra Founder
B
402
S
238
G
89
Posts: 24,632
Reputation: 196,031


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 1 guest