Need help in rope's logic

For questions about using Classic.

Post » Sun Jun 24, 2012 2:41 pm

I am following an example of http://www.scirra.com/forum/a-rope-on-a-roller_topic49497_post311730.html?KW=rope#311730

But I want something to be different:

- when I hit a key, the chain/rope will be extended by one object.
- (unimplemented yet) if I hit another certain key, this chain/rope will be shorten by one object.
- (unimplemented yet) I can create/destroy a new rope.
- (unimplemented yet) I can select which rope to extend/shorten.

However, I am fully aware that I do not understand how this works exactly, so here is my cap: http://www.mediafire.com/?7ej4r9i3c6f2u60

Right now, I am stuck in the first objective. Somehow, no object is extended from the initial object at all.

So like... how does a hinge in Construct work? And what kind of logic should I use for the 4 objectives above?
B
2
G
1
Posts: 38
Reputation: 526

Post » Sun Jun 24, 2012 11:46 pm

B
79
S
24
G
53
Posts: 4,731
Reputation: 40,225

Post » Mon Jun 25, 2012 12:19 am

My "r0j0hound"-folder gettin' bigger and bigger :P
You never know for what they are good for later^^.
And here comes my macro: Thanks R0j0!

edit: what is the hastable for in the .cap?zyblade2012-06-25 01:26:28
B
24
S
9
G
2
Posts: 294
Reputation: 3,160

Post » Mon Jun 25, 2012 3:20 am

Hashtable isn't used, I was going to use it to store the uid of the last link for each chain but I found just using the "for each" condition made it simpler.
B
79
S
24
G
53
Posts: 4,731
Reputation: 40,225

Post » Thu Jun 28, 2012 7:28 am

Image: http://www.mediafire.com/?ad74gmxqdub61rj

I got one more question: how can we create more than one hinge object iteratively? The code in the image above does not work.

Like, from image above, if I press "right arrow", how can I create 5 Sprites with hinges connected together? How can we store UID or reference in the loop?

Here's my cap: http://www.mediafire.com/?huas8f82b5f7tem
B
2
G
1
Posts: 38
Reputation: 526


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 9 guests