when I’m editing a custom behavior, I would like to be able to add conditions like:
if property > Number
Where you have a drop down menu of the different compare symbols (> < = …).
I did not find that option when creating a condition inside the editor.
When I choose the parameter “Number”, it only checks if the number is the entered number.
But you cannot choose comparison operators.
Is there no way to do this?
You cannot have an operator in extension conditions (at least currently). You can wrap the value of property in an expression and let the user compare it using the Compare two numbers condition.
That makes sense, thank you for the tip!
If you use a parameter of “string from a list of options” you can include the symbols or a description as options. You can have one parameter for the number and another for the type of comparison.
Yes, thank you , I tried that, but it’s really clumsy.
The field is really huge and it does not look good.
I don’t remember if there was another reason but I decided not to do it.
But thanks for the input!
You’d have to pay attention to the pixi.js structure, how gdevelop treats it, and then how the electron editor environment interacts with it.