I find it really weird to use the new version variables. I have hundreds of variables undeclared and I’m supposed to do it by hand, not knowing if they were text or number. Why can’t it be done automatically.
Also a weird bug appeared: I have no number variable called “name” and I wanted to assign an object variable the text variable called name. And the first time it gave me a number, even though I have no number variable called name.
It took me an hour (again an hour lost!) to figure out it was about the color in the editor
if you can’t see the nuance , one is orange the other is green.
So switching to the new version we have to redo all these lines because the text variable was taken as a number.
Yellow is number
Green is text
Calc result is text var so you get text there and it is green
Calc sp2 thikness is number var so you get number there but it is yellow
yeah thanks, but my message was about the mess of switching from old version variable to new. The editor seems to know which variables are undeclared so why it is not automatic. Also there’s no information about this switch anywhere. For example do we really have to declare ALL variables? what happens if there are still undeclared variables?
Old system will work perfectly fine only when you wanna use new system you need to declare
If you do not need to add or modify events by using new variable actions/condition then you don’t need to declare vars
But if you do then you need to declare them
Outside of the very specific exception mentioned on the wiki (Children variables of Structures and Arrays can still be undeclared because they’re dynamically accessible and have a parent that is already declared), for this question:
- If you are not using a project with the legacy events in them, yes everything must be declared.
- If you are making a new event entirely, yes everything must be declared.
- If you want to use the majority of the new or updated extensions that use the new actions and therefore need declared variables, yes everything must be declared.
A myriad of things:
- None of the above scenarios will function properly or at all.
- You will get errors when launching previews, and may get hard crashes when the game launches, if it gets past the initial errors about unknown data types.
If you are working on an older project using the legacy variable system and are unwilling or unable to go through the one-time effort of declaring your variables, you probably are best off sticking to an older version of the engine and disabling updates.
Unfortunately, in that situation you’ll have to deal with all of the shortcomings around that though (any existing bugs in that version, none of the new engine features, no support for older versions on the forums or discord, etc)
you mean as soon as i make a new event all variables have to be declared? even the ones only used in other scenes?
If you had variable HP previously with old var system
It will still work
If you would be now to add new var for example called Mana
You would need to 1st declare it for it to work with new system
Even if they add a new event to use that old HP variable, they’ll have to use the new actions/conditions, which will require it to be declared.
(Copying/pasting the old actions/conditions isn’t the same as adding a new event, so it isn’t what I’m referring to)
So i did read his message wrong
Cause i was sure he asks does he need to declare all variables even ones used in old events
Where what i meant is NO if there is not any new event to it
And YES if they gonna use new event system
But now i see he asks about other scenes
So your answer is more accurate