How do i pick up and throw with bounce!

Get help using Construct 2

Post » Tue Jun 10, 2014 6:21 pm

Hey there! ^_^
I have a feeling that my question which i have been searching for hours has a very easy solution, but i want to try and to create where, you as in the main character can pick up a ball and throw it with bounces, without it breaking, and repeat?

Ie, pick it up, throw it with a nice bullet/physics engine where it bounces 2-3 times, and after it has stopped bouncing, pick it up again and repeat?

Thanks in advance! ^_^
B
12
S
3
Posts: 164
Reputation: 1,530

Post » Tue Jun 10, 2014 7:03 pm

There are several ways to do this however the easiest is to add the Physics behavior to object and then increase its Elasticity value in the behavior settings. Play with this and with the friction setting until you get the effect you want. The elasticity values and friction value of any other objects the ball might interact with will also play a factor.
B
9
S
3
G
4
Posts: 80
Reputation: 3,273

Post » Tue Jun 10, 2014 7:10 pm

Oh and for the pick up part - just add an image point to your character and then move the ball to that image point when the character is within a few pixels of the ball. To release the ball you will need to have some sort of interaction...such as a touch or whatever that you will use to toggle the "holding" state to untrue and use a physics impulse to throw the ball in whatever direction you want.

If this is unclear, I can make a quick example for you later.
B
9
S
3
G
4
Posts: 80
Reputation: 3,273

Post » Tue Jun 10, 2014 7:17 pm

srealist wrote:Oh and for the pick up part - just add an image point to your character and then move the ball to that image point when the character is within a few pixels of the ball. To release the ball you will need to have some sort of interaction...such as a touch or whatever that you will use to toggle the "holding" state to untrue and use a physics impulse to throw the ball in whatever direction you want.

If this is unclear, I can make a quick example for you later.


Hey man, thank you so much for taking your time to explain this! ^_^
I couldnt ask you for a capx, you have already taken your time to answer me here, though i dont think i have seen any tutorial for this as i have been searching for it for hours (or i just missed it...)
So perhaps if you do an example, it can be up in the tutorial section for others to learn ^_^

Thank you for your time.
B
12
S
3
Posts: 164
Reputation: 1,530

Post » Wed Jun 11, 2014 9:52 am

Yeh i cant get it to work either, any capx or examples of this? xD
B
5
S
1
Posts: 37
Reputation: 451

Post » Wed Jun 11, 2014 4:30 pm

Here's a quick and dirty example. Use the arrow keys to move the blue "character" towards the ball. Once the character is close to the ball, the character will automatically pick the ball up. Throw the ball by pressing the space bar and the character will throw the ball and it will bounce off the ground. Hope this helps.
You do not have the required permissions to view the files attached to this post.
B
9
S
3
G
4
Posts: 80
Reputation: 3,273

Post » Wed Jun 11, 2014 9:49 pm

srealist wrote:Here's a quick and dirty example. Use the arrow keys to move the blue "character" towards the ball. Once the character is close to the ball, the character will automatically pick the ball up. Throw the ball by pressing the space bar and the character will throw the ball and it will bounce off the ground. Hope this helps.


Thanks alot for the help man! ^_^
Really appreciated!!
B
5
S
1
Posts: 37
Reputation: 451


Return to How do I....?

Who is online

Users browsing this forum: 25games, Baidu [Spider], jatin1726, Resslx and 43 guests