Better Variable System (Best out of old and new variable system)

Note: This feature request has been merged with Open variable setup from any action or condition - #8 by ZeroX4 since they discuss the same friction. To contribute your needs feel free to join that conversation.
-Luni

If you gonna get anything out of this post i want you to get this
I am biased against declaring ALL variables
Not biased against declaring exist
But biased for new system which takes away option of not declaring them

I do not want to get rid of declaring and i do not want to argue over which is better cause i know what is better for me and i know for others something else can be better

That said my proposal for possible best out of two worlds

This is just a concept i am NOT UI designer i just have idea which for sure can be improved and make this window be more user friendly and streamlined

What if variable window would look like this? (Again just concept if you have better idea i am all eyes and ears)

Look we can choose on top it will be scene var or global var
Below we choose var name and engine detects it is not declared
Notifying us about it with yellow exclamation mark inside triangle
(Red errors should be reserved for things that will not work while yellow should indicate something is wrong could be fixed/adjusted but will still work)

Next we can choose in middle will it be number boolean string array or structure type of var using radio button (radio button is term well from radios if you press one button ALL other buttons gets "un-pressed ")

And depending on that modification sign and value we can input would change
A little different for boolean since it would be only true/false same for toggle

And below that we have option do we want to declare this var since it is not declared or not

And that would allow us to either sit with not declared variables or declare them in the same window we care to start using them
We do not need to go to different window to set something up
THIS is our control panel we do all we want from here
We set everything here there should be no need to take us to different window
We just switch one option there to declare it as simple as that

Either we rot in hell of undeclared var and need to repeat setup process each time
Or we simply flip YES next to question do we want to declare this variable

This way we still have a choice between not declaring variable and declaring them
Instead of only having option to declaring them
At the same time process of declaring variables happens in same exact window/moment you care to start using some variable
That’s why i say it is best from two worlds (or more like old and new system)
NO ONE is harmed we all get something that will improve our workflow
There is no need to take anything away to prove one is better over another
We all will be able to decide which is better ourselves or at least stick to one that suits better our workflow
Not to mention all options you should have at your disposal you have in ONE SINGLE WINDOW
I would say radio buttons for variable type are literally in your face so i could hardly see user how to change variable type or select one

Where if variable is actually declared
All options in this window should be set automatically
For example if we type in variable name idk MyBoolVar which is declared boolean global variable
Then all settings should set themselves to it automatically
But then what if we want to change type of that var?
Should we be able to do it from here or go to variable window list?
That is something for debate yet i know i would wish to be able to adjust it from this window

And lastly i would say that this yellow exclamation mark inside yellow triangle in events sheet is enough of notification that this var is not declared


There is no need for red text and wave underscore or however its called

How would you choose between global and scene variables?

Very decent idea that I fully support from user stand point, much more streamlined and doesn’t require to jump between multiple windows to set stuff up compared to the current situation.

In same exact window by making choice between another radio button

Again it is just a concept
It could look better be placed somewhere else does not matter but should be there

1 Like

It would be more intuitive and one clique shorter to simply make Global Variables its own thing.

Right now you have Variable Value, Object Variable, why not add Global Variable Value?

That way you type in on the search “Variable” and all 3 Show up.

You already make the user action to pick either Variable or Object, why not add Global?

Then use the UI ZeroX4 was suggesting.

While it will works,…too many clicks…i pass
the usefulnes of a not declared var is the usefulness to don’t need to declare it

In same exact window by making choice between another radio button

How would it look as a sentence in the event sheet?
Usually you can edit everything directly from the event sheet.

I agree with you, im on the same boat.

But what hes suggesting is only one clique slower at this point.

Instead of typing for example, Number variable and then selecting “Change number variable”.

You now would type “variable”, select Variable Value, then select Number in the window and do the rest as usual.

If Declare variable is default to off, if its on every time then yeah, it would be annoying…

I dont know… this whole situation is meh, i finally get the “I wont update” people, im happy with what i got.

Right now for some extensions and actions/conditions you have drop down list
Heck you even have that for layers
For some you have many choices i think shadow clones extension had most choices
I see no reason why variable action/condition could not also have it?

Look how many choices it have


For ppl that never used shadow clones extensions
What you see here is ONE SINGLE ACTION

Cant it just look the same?

You dont always have all the options on the event sheet.

Like Tweens, the option to deleted when tween is finished option dosent show on the event.

Cant the event sheet just show the old variable event?

And if you want to change the “Declared” part you go back into the window by double clicking it as usual.

This is for streamlining the process for everyone
Not just for us (i do not want to declare everything)
Not just for them (i want to declare every single variable i have)
But for everyone

Look
Old system
You needed to find proper action for either global/scene var
You needed to find proper one was it boolean string or number for example
I won’t lie back with old system i literally just type in search bar var scene
Or var global
And added 1st one i found without reading which it was and if it was not one i need i double clicked it and now i selected from list on the left one i wanted
I did it often for strings toggle boolean and structure vars

With my proposal you always type ONLY “var” in search bar
There is only one action/condition to be picked
By default it would be number var since it is what we mostly use
We could debate if by default it should be scene or global
But your choice is made in same exact window
You do not need to search for anything anymore
And now you have option to declare it right away or not

So with my idea you need to type always same short word VAR in search bar
And only difference is you need to select manually will it be scene or global
While remaining click you will need to make are pretty much the same as before

what happen when you 're going to use the same var in the same event.(or in a different event)…let’s say whith a changed value…?
now (i mean before update) u can copy and paste and type the number.

imo your method is what they actually did in the update for declaring a var

I’ll start by saying that I’m not against your idea, I’ve seen in recent days that many have complained about the new system, those who have suffered the most are those who have big games and have to declare everything now. but honestly speaking for me it’s not all this big of a problem, even if I understand the others, I think it’s mainly a concept of habit that we’ve become accustomed to for years or maybe I’m wrong and really for many this new system of variables is a problem because it causes too much back and forth. However, in this whole story I add myself to your change to the UI, when you write the variable in the actions and it is not declared, a drop-down menu below would be enough on how you would like to declare the variable and the “Value” box would change based on the selected variable.

However this whole story is a problem for the devs, because I imagine they took pains to create this new system that I hardly think they will change to go back to the old one, but I hope that in the future they will make more public announcements about their future updates, especially about changes to the core like this, I remember that Luni did some very interesting tests with users, strange that he didn’t do it for this feature too, I’m sure that involving the base user would have been something welcome to reach a compromise.

What do you mean?
IF you set some var in that window i propose
You would get exact representation of it in events sheet with all options you selected
It being scene or global var it being bool or number or string or whatever

So you could just ctrl+c ctrl+v and change in duplicate only ONE single thing you want different
For example one add number to var while in duplicate simply change from add to set to to mod that variable

Either i do not understand what you want to do or you do not understand what my change propose

You see my proposal is not taking away anything from any1
It only gives everyone what they want

I do not need you or any1 to worry about my variables
If i don’t want to declare them i won’t
If i want to declare them i will
But with my idea now i can do all that in same exact window where i start using that var
I do not need to jump to different window and set it up there
I can simply choose what i want where whole thing started
And now in same exact window i can declare it or not
And next time either i need to go trough the process again or type in name of var i declared and everything is set for me
But i did choose how i wanna handle it

My idea is in favor for allowing us still to use undeclared vars
But look at it
It is promoting declaring since how many times you gonna set up var in that window before you start declaring them to not repeat same actions (not events sheet actions but human manual actions) over and over?

I am not against declaring variables
I am against taking away choice do we want to declare them or not

And with my idea everyone should be happy

1 Like

I instead got pretty wel what you have in mind and what Davy asked above…
Your sentence to call a var would looks like this:

if the “global” variable “myVariable” set to 0 , is variable declared “no”.

to me it looks like a step back.
to be clear a step back of what i have rite now.

but…if this gonna mix both methods…it may works…
lol…i just don’t wont be there to test it…

You meant more or less it would look like object var?
Since right now it is like
Change value of object “pick your object” variable “VarName” set to 0
Where as i mention not declared should be indicated by FOR EXAMPLE yellow exclamation mark inside yellow triangle before the var

So global var action would look like
/!\ Change the value of “Global” variable “VarName” set to 0
Wait sorry it would be

/!\ Change the value of “Global” “Number” variable “VarName” set to 0

Right now you have actions/conditions with more things to change than that
So i do not get at all what is problem in that

I am not aiming with my proposal to take away something from any1 but to give something to everyone
If you have better idea how to make everyone happy not just me not just you not just someone but everyone
I am open for any suggestions

Since problem is about making it better system for everyone not just for us or them or whoever
We eventually need to accept some compromises

1 Like

I get why the new system can be great for many reasons. But I agree that being forced to declare each and every variable can be a setback, at least for my workflow.

I do a lot of trial and error while working on my games. So most of the time, I find it very easy to just create and use variables on the go through events. I set variables through an action and get it’s value using the long expression, then decide later if I want to declare it or not. And if I don’t like the approach, I simply delete the events and not worry about any variables.

I have a big project which has close to a hundred undeclared variables and they’re only used once or few times. Right now the project is working fine since the old events are still working, but I don’t want to start cluttering the variables page by adding so many variables that I don’t care about declaring them.

This becomes even a bigger headache when working with object variables and groups.
(I just realized that you don’t get the add/edit variables when modifying a variable of a group since it won’t make sense.)

One other reason for using non declared variables is to be able to change the variable names from the variables page and not worry about messing up the events.

I like the new system and I can get used to it, but I don’t like being forced to declare each variable. It’s more limiting and makes my workflow slower.

This is my opinion on the matter and my suggestion would be similar to what others are suggesting.

1- Have separate conditions & actions for Object / Scene / Global variables.
2- Allow choosing type of variable via drop-down menu when it’s not declared (refer to screenshot). But if the variable is declared, then the drop-down would be automatically selected and greyed out.
3- Have the choice of not declaring variables and don’t display red errors in the events sheet.

Extra note: Right now you can’t use this system if you have a scene and a global variable with the same names, only the scene variable will be available.

Honestly, after sometime, I think I’m fine with the new system

Because:
You can use structure variables to hide variables you don’t use much.

You can go in the Variables’ menu just by going on the action.
I
t’s easier to set a beginning value to a variable.

Although, It is indeed annoying to have to manually set all undeclared variables for this one reason, it would be fine if it automatically declared every variable.

Thats what people seem to be slow at understanding…

You could already do all of that before. No change needed.

…and the undeclared variables were already being sort of “auto declared” for you, they just didnt show in the variable page, but they worked and showed up in expressions.

The system worked.

They just decided to force the steps on you.