Merge similar actions into one

  1. Merge “Show” and “Hide” actions into “Object visibility”

  2. Merge “Show a layer” and “Hide a layer” actions into “Layer visibility”

Because this is a topic that was mentioned on the wiki:

https://wiki.gdevelop.io/gdevelop5/extensions/best-practices/

"For actions that are enabling or disabling something, use a boolean (Yes/No or True/False) parameter.

  • For example: instead of two actions “Check the checkbox” and “Uncheck the checkbox”, make a single action “Check (or uncheck) the checkbox”, with a “Yes/No” parameter. For the sentence in the Events Sheet, use something like Check the checkbox: _PARAM0_.
  • For example: instead of two actions to enable or disable something, make a single action “Enable (or disable) something”. For the sentence, enter: Enable something: _PARAM0_."
4 Likes

Agreed, the only problem is people who have already used this on so many events.

There is no problem. Conditions, actions and expressions can be deprecated and they will be there working just fine, have you noticed that now tweens use seconds after 5.3.179? But the old ms ones are still there on your eventsheet.

Also just to add to this suggestion, when we want to hide something, we most likely will also want to show it again later, and it forces us to search twice for an action that should be one.

I kind of always thought it was weird it wasn’t under one “Show / Hide” action or condition.

Oh yeah, this is even weirder though.

There’s two types of Z coordinate. Z (Elevation), and Z Order. They’re exactly the same. Only that they’re for different types of objects. They should be merged.