I am trying to create a simple function called “CreateRandomGarbage” that takes three actions and turns them into a callable function.
The three actions are:
- Create object Garbage (sprite) at random position…
- Change height
- Change width
I tried to follow a GDevelop YouTube tutorial on functions and expressions and the documentation as well. It mentioned parameters, but my inputs are static and not dynamic so I don’t need parameters (?). I made my Garbage (sprite) object global in an attempt to get the function/extension to “see” it but that didn’t help.
Can someone help me figure out how to create a simple function with three static actions (or two, I could just use the scale action instead of height + width separately)?
This is a very basic prototype game to help me understand solid, draggable, physics2, and “snap” behaviors:
I am restricted to one embed so I chose the image that has the three actions I’m trying to convert to a function.
*Edit to add: I want to create about 9 random garbage objects when I load/reset the scene. This is the reason for wanting to make a function. Not sure why I spaced this part!