Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
So I want to be able to shoot a basketball in the game. So however long you hold down the left mouse button The harder it shoots. The skill curve is always lining the ball up. And not have to look up to shoot the ball is that possible? Willing to pay if somebody can do it. |
||||
|
I edited the request, is it possible for someone to do that? |
||||
|
If this is for windows, you could use the built in physics. Then you would accelerate the ball in a certain direction, independent from the camera. Do that on mousebutton-release. On mousebutton press you store the timer. On release you calculate the time difference between pressing and releasing, and the longer it is, the more you accelerate the ball. This tells you the milliseconds that have past since the last booting:
It's a steadily increasing number, useful for time measurements. In order to communicate between the two behavior scripts, you can use a ccb variable. So, add a behavior to the ball: when a key is pressed (mouse, when pressed), in "special, execute javascript": it gets the millisecs timer and stores it:
Add a 2nd behavior, on key press, specifically on mousebutton RELEASE, that does this:
Using the built in physics is a chapter on it's own. But I guess there's plenty of help and docs. |
||||
|
paperbag wrote: So I want to be able to shoot a basketball in the game. So however long you hold down the left mouse button The harder it shoots. The skill curve is always lining the ball up. And not have to look up to shoot the ball is that possible? Willing to pay if somebody can do it. Check out CopperBasketball https://youtu.be/vaRltuRXeac?si=... |
|