Closed D8H closed 3 years ago
What you think to merge your extension with mine? Extended variables support
You copy the object variables, let make it explain in short description.
Copy all variables
=> Copy all variables object
Copy a variable
=> Copy a variable object
Copy all variables from one instance to another
we don't talk about instances to users, we talking about objects (even if I agree with you it's an instance copy function). The only place where I can see "instances" is for "Instance variable"
(I don't think the word "Instance" is used at all in the event sheet)
Sentences like Object where variable values are read
, Variable where the value is read
etc...
Are in logic in Long description field. Label is used to be short.
Object where variable values are read
=> Object to copy
Variable where the value is read
=> Variable to copy
Object where variable values are read
=> move it in long description, and replace label by Object to copy
The remaining labels and other long descriptions are fine.
What you think to merge your extension with mine? Extended variables support
Of course, I made the changes and update the archive file.
Cool! Extension description have been updated, the version ,and tags too. You function is added and changes are done. What to said ^^ You can add your Github handle on the Author field!
For A_CopyAllObjectVariables
is mandatory to check if the target have the variable?
The variables must exist in this object for the values to be copied
GDevelop create the variable on the fly when this one is missing.
For
A_CopyAllObjectVariables
is mandatory to check if the target have the variable?
Not really, in the documentation of Variable#add I saw "This can be costly". So I avoided to use it and left the choice to the user to declare them but this may be not really user friendly. I don't know what's best.
For
A_CopyAllObjectVariables
is mandatory to check if the target have the variable?Not really, in the documentation of Variable#add I saw "This can be costly". So I avoided to use it and left the choice to the user to declare them but this may be not really user friendly. I don't know what's best.
@4ian
Yes it can be costly because indexOf is used
Yes it can be costly because indexOf is used
I see so the "get" method must be use. I changed the extension code to let the "get" creates the variables if necessary. It's simpler that way.
Ok I'll make a last check later today and merge it. Thanks you!
Thanks both 👍
Describe the extension
It contains actions to
This allows to copy structure variables at once. I use it for the tactical game example to copy variable from level objects to in-game objects (https://github.com/4ian/GDevelop/issues/2612)
Checklist
Extension file
https://www.dropbox.com/s/nd87wtshqad4n4u/ExtendedVariables.zip?dl=1