# Getting variation in angle of motion for bullet behaviour

Just started using Construct 2? Post your questions here

### » Fri Mar 13, 2015 9:24 pm

Basically, I have it where a ball (via bullet) follows the same angle of motion when bouncing off another object. Even if the ball hits a different side of the object. I still want the angle of motion to follow the same kind of arc (for gameplay purposes) but I want to introduce some slight variation (by 5 degrees) into the angle of motion if the ball hits specific areas of the object. Like this:

Can this be done in bullet behaviour? Perhaps by calling different image points (but what should I bring up in the event panel to do that)?

EDIT: Forgot to add it, but imagine there being a bounding box around the object. So, dead center bounces out at 285, from the center to the top left at 280 and on the entire left side at 275.
B
8
S
2
G
1
Posts: 34
Reputation: 623

### » Sun Mar 15, 2015 5:33 pm

if you already have the bounce done, and simply want to "add variation", try:

set angle: Self.Angle + choose(-5,-4,-3,-2,-1,0,1,2,3,4,5)

It will randomly pick one of the values from choose and will add/withdraw
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,597