Canon ball game create object question?

Hi,

My question is about the canon ball game:

canon

and this code:

Can you please explain to me what does it means:

MouseX(" ",0)

and the other one

Cannon.PointX("spawn")

Is spawn the name of a point?

regards,

MouseX() and MouseY() have been depreciated. The current expressions are CursorX() and CursorY()
The values inside the parentheses are optional (layer, camera number)
https://wiki.gdevelop.io/gdevelop5/all-features/mouse-touch/reference/#expressions

Yes, “spawn” would be a point on the cannon.
https://wiki.gdevelop.io/gdevelop5/objects/sprite/edit-points/

It seems like both values are optional.
Couldn’t we use just CursorX() ?

1 Like

You can just use CursorX() and CursorY()

1 Like