Welcome to all!


#21

Function parameters are parameters, not scene variables :wink: You must get them using GetArgumentAsNumber(“yourParameterName”) or GetArgumentAsString(“yourParameterName”)

You can find them in the “Functions” category in the expression selector:

So seems like we would need:

  • To have a better visual separation between functions and behavior functions.
  • To make it more explicit that parameters are not scene variables. Maybe a dismissable Alert telling that String/Number parameters can be used inside events with GetArgumentAsNumber/GetArgumentAsString?
  • At least, we should add this to the wiki because I don’t think there is a page explaining GetArgumentAsNumber/GetArgumentAsString

#22

Yes you’re right, I think there must be a tip like

use this parameter with GetArgumentAs<TypeOfParameter>(ParameterName)
i.e.: GetArgumentAsNumber(myParameterName)

Or at least a documentation page, I’ll do it for you if you like the idea


#23

Did it dude!! :heart_eyes::heart_eyes::smiling_face_with_three_hearts:

The result is pretty crazy! Check it out @ https://www.loom.com/share/b7e1d5909bac4581b118813abb83f285


#24

Looking super great! Really nice and make the game look more dynamic and polished, well done :slight_smile:
If you’re willing to, feel free to export the extension to a file and submit it to GDevelop-extensions (all the details are on this help page).

I’ll be happy to make this part of the library of extensions :slight_smile:

Sure feel free to start one and I’ll move it if needed :slight_smile:
You can create an account on the wiki and add it here: http://wiki.compilgames.net/doku.php/gdevelop5/behaviors/events-based-behaviors/use-functions-parameters

We’ll add a link to it in: http://wiki.compilgames.net/doku.php/gdevelop5/behaviors/events-based-behaviors. A few guidelines worth reading for the wiki: http://wiki.compilgames.net/doku.php/gdevelop5/community/contribute-to-the-wiki


#25

Thanks a lot! I’ve already added the issue on Github here.

I’ll proceed with the wiki page, I’ll contact you when I’m done, do you prefer via Blog or Discord?


#26

Feel free to send me a PM on this forum :slight_smile: