Welcome on the forum
Camera zoom looks pretty cool. In GDevelop you can develop your own functions and behaviors and submit on GitHub to be included. It is looks something that would be useful to have in GD.
All contribution is welcome
There’s a dark theme in File/Preferences, though not perfect. I think almost everyone is using it
On the Github and the Trello, you’ll find everything you need to contribute to the software, including bugs and feature requests
It seems the expression works only with variables?
I created a quick test and the expression did not work when I used it directly but if I was use it to assign the property value to a variable first and then use the variable, it worked.
So you can try something like this maybe:
Do = Object:Behavior::PropertyZoomTo() to scene variable ZoomTo
Do = Object:Behavior::PropertyInterpolation() to scene variable Interpolation
lerp(GlobalVariable(zoomCamera), Variable(ZoomTo), Variable(Interpolation))
I’ll take a more in depth look tonight, thanks for sharing the extension/project
I suspect though, as it’s working with scene variables, that properties are working well but not necessarily the way you would expect them: remember that contrary to the scene variables, they are specific to each and every instance of the behavior.
They are akin to object variables
Let me know if this was clear for you or not?
I think a tutorial on how to use action and function parameters is a must, what do you think?
Yes, it is clear to me, but I don’t have any tool to inspect them or just reference them in my functions.
I think having a shortcut to reference these behavior variables could be a great improvement in usability.
There is the section called “Add and use properties in a behavior”. I do agree it’s fairly short - let’s identify what piece is missing and add it
I think is missing a specific example on how to use Behavior global properties and Function related properties, I think this is a must and I can extend the wiki by my self to help others reaching complex behaviors development.
The best way to handle this is to create a real use-case example, like I’m doing for my AdvancedPlatformCamera behavior, to introduce newbies to the custom Function/Behavior development.
I think this is a great way to extend GDevelop with new cool features!
So seems that the distinction is not clear, but you created all your functions as “free functions”, that are not part of the behavior. So you won’t have access to any of the behavior action/condition or expression to set/get the properties
On this screenshot your functions are on the left:
You can verifying that you’re “inside the behavior” because the first two parameters are grayed out and are called Object and Behavior.
This function is attached to the behavior. You can use the “Object” and its Behavior inside it… including the properties
You might want to activate the new action/condition editor in the preferences, because it will ask you for the object first when adding a new action/condition. This will help you to see what’s available.
You’ll find the expressions at the end of the list when editing a formula and opening the list of expressions
Dude I’m sorry but I can’t reach function related variables, I’ve removed each behavior parameter because I want to keep a single dynamic function to handle the zoom, but I can’t take the function parameters: