[Solved] Pass variable as a function parameter

Is there a way I can pass a variable as a parameter through a function?

I have made the following scene variable: xPositionObject1 and xPositionObject2, ,. These positions are calculated based on some conditions.

Now, I want to create a variable say, xPosition. And using functions I want to pass the value of this variable through the parameters.

Start here :slight_smile:
And follow the last link on page for next step :wink:

http://wiki.compilgames.net/doku.php/gdevelop5/events/functions/replace-external-events#example_of_replacing_external_events_by_a_function

1 Like

Thanks! I have done this using object variable.