I am completely new to construct 2, and I am a "classic" developer that usually writes code, so I have a hard time trying to understand construct 2.
I need to set the opacity of the mouse cursor, dependent on some condition in the game.
So I decided to create a function that would change the mousecursor sprite, but adjust the opacity of the sprite before doing so.
This function needs to take a parameter telling it if it should increase or decrease the opacity.
But how do you create a function that takes a parameter, and how do you access the parameters within the function?
The manual mentions that a function can take a parameter, but does not give an example of how you actually create such a function.
The old dude is a little confused
Develop games in your browser. Powerful, performant & highly capable.
You can add parameter through [Action: Call Function]. Just click "Add Parameter" to add parameter. In the function, you can take the parameter by index such as Function.param(#index).
There are some screenshot at tutorial page as far as I remember, it's more intuitive to look at pictures.
Ok thanks I figured it out.
Boy I wish I could just write some simple code.