Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object-variable expression missing for Number variables #6697

Closed
1 task done
jack-ii opened this issue Jun 20, 2024 · 3 comments · Fixed by #6728
Closed
1 task done

Object-variable expression missing for Number variables #6697

jack-ii opened this issue Jun 20, 2024 · 3 comments · Fixed by #6728

Comments

@jack-ii
Copy link

jack-ii commented Jun 20, 2024

Is there an existing issue for this?

Describe the bug

If I want to fill a global/scene variable with the declared type Text with an object variable, there is an entry for it in the expression editor. But if it is a variable with the type Number, the entry is missing.
The same e.g. with Storage save actions.
1 2


Another problem, it is not possible to pass a boolean value from a scene boolean variable to a global boolean variable because boolean variables do not allow expressions.


GDevelop version

5.4.204

@D8H
Copy link
Collaborator

D8H commented Jun 25, 2024

Thank you for reporting an issue.

Indeed, we forgot to hide VariableString() for objects.

A new system has been introduced fro variables in the 5.4.203. Please take a look to the release note:

You can also find more details on the forum:

Another problem, it is not possible to pass a boolean value from a scene boolean variable to a global boolean variable because boolean variables do not allow expressions.

This has never been possible with expressions. Boolean values can be copied using conditions and actions.

@jack-ii
Copy link
Author

jack-ii commented Jun 25, 2024

Indeed, we forgot to hide VariableString() for objects.

Ah okay I thought so. That mean we should use autocomplete?
Maybe it would still be good to have an entry in the expression editor. If you don't know the name of the object, you get a clean easier to read list of object-variables and above all you can create an object-variable there, without having to switch to the scene editor first.
For everything else there is also an expression menu, I wouldn't remove it specifically for variables, there is no disadvantage to leaving it there.

This has never been possible with expressions.
Would be good if this works in the future :)

@D8H
Copy link
Collaborator

D8H commented Jun 25, 2024

That mean we should use autocomplete?

Variables must be declared and their names directly used in expressions (without Variable()).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants