Make add Local variable actually add and not replace

Look when we right click some event and choose replace then move to group
Whatever event we had selected and even if more than 1 was selected ALL that will go into that group we just created
And that is expected since we REPLACE it

If we right click any event and choose Add > For each object
It DOES NOT replace our event it just add one below whatever we clicked

So i say Add > Local variable should Add/create new event with local vars BELOW whatever we clicked instead of replacing what we clicked

This is not major thing but its annoying
I have more than 2 but lets say i have 2 layers
I need to adjust effect on each of them separately
So for better visual representation i split them into two events
However when i right clicked one of them and choose ADD>Local Variable
It was replaced with local variable event
Instead of local variable being added below
I did not ruin anything for me just wasted my time
Cause now i need to cut out all actions from there and move all my actions to separate event so i can move both events with effect actions under local variable event as sub events

So i get this

Where all i wanted to have is this

Like i said its not end of the world
Now imagine wanting to do same thing as i did but having there let’s say a little more actions
Not to mention conditions

Now i think we should have some means to select all actions or conditions from event without selecting event itself

ANYWAY again its ADD local variable not REPLACE with local variable

So it should add something not change something
AND DO NOT get this as request to move local variable from ADD menu to REPLACE menu

I ask for it to create new event type below just like we have with repeat and repeat for each and so go on

1 Like

An event with local variables is not an event type. It’s only a plain event to which you added local variables. The local variables can be removed if they were added by mistake.
If it can help, the shortcut to create an event is Shift + A and the one to add a local variable is Shift + L

Maybe i don’t know proper naming

But to be perfectly clear
What i mean by event type
Is event that does not look like your regular event

So event block visually changed
I hope you get what i mean

But anyway
My argument still stands
When i add for each or repeat
It is added as new event and not modifying existing one

Where if i replace into group it is shoving all selected events into group instead of adding something

My request is not about giving us way to easy access something
But for something that is there to make sense like rest options in same menu

From a UX perspective, local variables are closer to an ‘invert condition’ than they are an event type (for each, repeat, group)

I am not sure making them add a separate event block makes sense because they aren’t designed to exist on their own.

It feels like making them behave like for each or repeat (or even like group/comment) would break a lot of peoples existing workflows, or confuse people trying to learn how to use them.

If anything, I would think local variables should be moved out of that submenu entirely as they are really not similar to them at all, and should be listed more like the disable event option in the menu.

That is just my initial feeling at first review, though.

And you @davy

Let’s make what i like to call caveman test
We just for whatever reason regressed back in evolution to caveman level of intellect
We don’t know how stuff work but are fast learners

SOOOO
I right click event i choose Add > Event group

And event group is ADDed on top of event on which i clicked

I can right click and delete event group and it will delete only event group
Leaving initial event intact since its not part of event group

Now i right click same event and choose Replace > Move Events into a Group

And event i clicked was sucked into event group i just replaced event with
We could say it was REPLACEd with event group

Now if i right click that event group and delete it i will lose event group and my event

And now remember my caveman companions
We have intellect of monkey but we still are able to monkey see monkey repeat

SO
Tell me caveman fellas
In light of what you seen above
What should happen if i right click that event choose ADD > Local Variable

Even better what should happen if i right click that local variable afterwards and click delete?

Remember think like caveman and don’t answer with what you KNOW will happen but what should happen based on your observation of two previous examples

And now we can have conversation about what next
I don’t care what it does
I care for it to be in right place which would make sense
For me it should be under Replace sub menu
Or if its to stay in Add then it should add and not replace event

I agree to this little fix…another one i would like is the swap between the home icon and the game propierties hamburger icon ( i mean the home should be to left side imo)

btw upvoted bcs i love to think as a caveman.

1 Like

The event group is nothing more than a label. When you first add an event group, it is positioned above the event you were clicking on, the same way as when you paste an event. Then it works exactly like an empty event… you can drag it around and give it sub-events. I never knew about the “add to event group” option… like a proper caveperson I just drag my events to the desired position :slight_smile:

Anyway it looks and acts like any other event, just filled in with a different background and large text rather than conditions and actions. If you select it and delete it, you delete it and all of its sub events. Same as any other event block.

Similarly, any event that has local variables, repeat for each, etc. will behave exactly the same way. The gray bar that shows local variables is part of the event block, not its own entity. If you just left click on the gray bar, you won’t see an outline on just that region… the selection outline goes around the whole event.

Maybe this will help you understand issue

Huh? You just linked to the post I was replying to.

Look this is not any serious issue
This is matter of consistency
That is why i explained it via caveman test

If we would come to gdevelop today
Like today is our 1st time using it

can you tell me with hand on your heart that we would NOT be confused why other stuff from ADD menu adds something
Where this very one local variable option is converting/replacing our events instead of ADDing
While there is Replace menu

That is the issue

No one is stupid enough to watch out after noticing it once to make it to some empty event
And not to mess event they would possibly not want to convert
But at the same time no one should watch out
That is the point of UI to make sense

And not for any1 to remember exceptions
Which can be fixed by modifying their behavior or their placement in context menu

And don’t get me wrong i get that you are trying to help

But we should work toward fixing cause of issue and not the result by finding workaround

The thing is, when you add a local variable, you can see that it attaches to the event you selected. You’re adding variables to the event. It is slightly different than the other options in that menu, I agree. But since you can see visually what is happening, it doesn’t seem confusing to me. Replace menu would not make sense… you aren’t replacing anything, just adding variables to an event block. I mean really you could put a gray bar on all the events to say “no variables” but that would just be a distraction :stuck_out_tongue:

Anyway, being able to select-all would be really nice.

Replace does not mean change it with something totally different

Replace means change it with something that is not the same while it can be almost the same

So if your event keeps all conditions and actions
BUT event itself is not standalone event but event with local vars
Then it got replaced

There can be tons of situations where you would NOT want it this way and it being only added as new event above event you clicked just like repeat event

Core idea here is not like you describe to see something and know something to be able to workaround

But to make sense to what should happen after clicking something from same menu

You should choose whatever from Add context menu
And each option there should do exact same thing event wise
There is NO you can this you can that
It should work same for all options there
And if one of them works same as something from other menu
Then either functionality should be changed or place of that option in context menu

Imagine arrow keys would be used to move up and down on events sheet
BUT key down would expand hamburger menu instead of moving down

And someone would come here telling you that you can use numpad 8 0 to navigate up and down
NO that is not the solution to cause of the issue but solving its effect
Which is wrong

Either both arrow keys should open something or both should navigate trough events sheet

I would not want it this way. How would you add local variables to existing events? Are you saying there would be two different menu options, one in the “add” menu to create a new event with local variables, and one in the “replace” menu to add local variables to an existing event?

We have same exact story with Event group so whats any argument against it?

Move events to Group is just a shortcut for adding an event group, and then moving the selected event under it. I have never used this and didn’t know it existed until now, and I think it is not intuitive for this option to be under “replace”. This could partially be a transliteration issue, since the word replace technically just means “place again” but is colloquially used to mean “remove and put something else there”. As in, I replaced the apple with an orange. That’s not exactly what the event grouping option does, instead it adds a group and then “places again” the events. I would have called this menu “Move” instead.

Adding local variables is different because you’re really just editing the properties of existing event blocks. It wouldn’t make sense to select a whole bunch of events and add local variables to all of them, for example.

Just cause you don’t use something does not mean others also
I don’t use mobile app
I would say let’s remove half of buttons we have in UI cause we have hotkeys

And you are justifying your logic by what you think should happen
And not by what is happening using any other Add event option

You are bending your arguments to theory you find accurate
And not to what is in fact functionality accurate across other options under Add menu

We can argue all day
But until facts will change i hardly have anything to add here

However i am open to reading any ideas and possible solutions if they will be functionality accurate