How do I stop an elastic band from stretching too far?

Get help using Construct 2

Post » Tue Feb 24, 2015 9:45 pm

I'm making an Angry Birds like game but when I test it out I can just stretch the slingshot to the obstacles and win the game that easy. What's the easiest way to stop an elastic band from stretching too far?
B
12
S
3
Posts: 129
Reputation: 1,131

Post » Wed Feb 25, 2015 8:36 am

I didn't make this kind of game before, but I think I saw a sample in the tutorial. (also for download)
B
15
S
4
Posts: 77
Reputation: 1,030

Post » Wed Feb 25, 2015 11:30 pm

Which tutorial?

Also, I was thinking that I might be able to make an invisible barrier that the slingshot cannot go past. Is there a way to make a barrier only impassable to one object?
B
12
S
3
Posts: 129
Reputation: 1,131

Post » Wed Feb 25, 2015 11:51 pm

you have a angry birds example in construct itself, its called catapult , and the code for the distance used in it is this

min(distance(mx, my, mouse.X, Mouse.Y) / 3, 100) the number 100 is the length of the band to be stretched, the mx , my is the mouse x mouse y when mouse was initialy pressed, u could better use it from example cause this is not completed u need 1 aditional code for it to work properly and add the impulse
ImageImage
B
54
S
14
G
64
Posts: 1,252
Reputation: 39,470


Return to How do I....?

Who is online

Users browsing this forum: Solomon and 27 guests