How do I simulate a yoyo effect?

Get help using Construct 2

Post » Thu May 22, 2014 6:12 pm

Hello, I'm making a game where the player character has stretch powers (think Mr. Fantastic), and one of the attacks in a stretch punch that sort of works like a yoyo. Originally I had issues implementing this and everything I tried didn't seem to work (custom movement, physics) until I tried this:
viewtopic.php?f=147&t=100775&p=761623&hilit=yoyo#p761623

The method in the above link uses a for loop to simulate the yoyo effect. It works but the arm always stretches at fixed length. I want to change so that if the fist (ball) was the come in contact with barrier it would immediately contract.

Illustration of what I'm trying to achieve:
http://i.imgur.com/SfZaLnK.png

Screenshot of For Loops:
http://i.imgur.com/mMYeYAU.png

Project DL Link:
https://dl.dropboxusercontent.com/u/4173094/StretchPunchDemo.zip
B
5
S
1
Posts: 9
Reputation: 701

Post » Fri May 23, 2014 8:08 pm

B
92
S
32
G
107
Posts: 5,274
Reputation: 69,959

Post » Sat May 24, 2014 4:22 am

Nice example.
On Angvik game there are professional weapons using this method.
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,155

Post » Thu May 29, 2014 1:20 am



Thanks! Was exactly what I was looking for.
B
5
S
1
Posts: 9
Reputation: 701


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], dop2000, evillair, mongoose665, MPPlantOfficial and 56 guests