2019-03-14 18:07:35

Hey everyone!

I want use the mouse in BGT.
I saw in the Scrolling battles audiogame - developed by Mason -, that I can use a weapons a mouse.
But I don't no, that the BGT programming language is supports the mouse movements in addition to using the left and right buttons.
I played Harry Potter videogames, developed by EA games, and when I make a potion in Half Blood Prince, I must used my mouse, that I can make the magic potion.
Example I had to move a mouse to the left to the right, when too much smoke was produced.
In the BGT the mouse gesture function is it possible?

Best regards,
Daniel

Thumbs up

2019-03-14 19:23:32

It is. You would have to call to the mouse_update function in the main loop of your game. See the BGT documentation for more info on this.

Ivan

2019-03-15 01:48:26

Calling mouse_update updates the MOUSE_X, MOUSE_Y, and MOUSE_Z variables*, to the amount that the mouse moved since the last update. If you want gestures of some complexity, that will be more complicated, but you should have everything you need with the buttons, x, y, and z.
* I don't remember if these variables are uppercase or lowercase. I always have to check, and I don't have the manual on this device. If MOUSE_X causes an error, use mouse_x instead.

Some of my games
Keep up to date by following @Jeqofire on twitter!
Ear Ninja?

Thumbs up