Clicking the button and moving character
fgb01

Guys good morning,
I'm wanting to make it, when the player clicks the button I made on the screen, it moves with the setvelocity ...
Thank you very much

1 Comment
Gio

Hi

Assuming you have an object called player, in your button's onClick function (or onMouseDown if you prefer) you can do something like this:

_.player.setVelocity(100, -20);

 

Post a reply
Add Attachment
Submit Reply
Login to Reply