"Locking" a Sprite to another

Get help using Construct 2

Post » Thu Mar 15, 2012 11:59 am

I am still not sure, what the "snap" will "bring". I am just looking on how it works right now, and it makes alot of sense to me....

and to be honest, right now, I have no idea how to "implement" the snap.

Try this - even thou its not snapping.

Set all, but the Elasticity attribute of the Shield to one. Elasticity to zeroWeishaupt2012-03-15 12:03:11
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Thu Mar 15, 2012 12:34 pm

I dont know how you did it with the pin behaviour. But I tried a very simple test with Pin to behavior, and it works really well:

http://dl.dropbox.com/u/52716812/PinToExample.capx
B
38
S
13
G
9
Posts: 151
Reputation: 8,427

Post » Thu Mar 15, 2012 12:35 pm

[QUOTE=Pixiefingers]
If the whole tower topples, the player wont be able to see where to place the next block.[/QUOTE]

Remeber me suggesting, that the platform could also move UP?!
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Thu Mar 15, 2012 12:37 pm

[QUOTE=CodeMasterMike] I dont know how you did it with the pin behaviour. But I tried a very simple test with Pin to behavior, and it works really well:
[/QUOTE]

Yes it works BUT it also prevents that the tower will fall apart if a box is placed on top it very crooked
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Thu Mar 15, 2012 12:45 pm

[QUOTE=Weishaupt]Yes it works BUT it also prevents that the tower will fall apart if a box is placed on top it very crooked[/QUOTE]

You just add a check. If the angle is too great, then dont pin it to the behavior, and let it fall off
B
38
S
13
G
9
Posts: 151
Reputation: 8,427

Post » Thu Mar 15, 2012 12:47 pm

[QUOTE=CodeMasterMike]
You just add a check. If the angle is too great, then dont pin it to the behavior, and let it fall off[/QUOTE]

Depending if you only want the last box to tumble, or the whole tower to break appart.....
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Thu Mar 15, 2012 12:51 pm

[QUOTE=Weishaupt] [QUOTE=Pixiefingers]
If the whole tower topples, the player wont be able to see where to place the next block.[/QUOTE]

Remeber me suggesting, that the platform could also move UP?![/QUOTE]

Yes. I see now its actually a good idea.
B
11
S
2
Posts: 127
Reputation: 1,532

Post » Thu Mar 15, 2012 12:56 pm

I only want the last box to be able to tumble
B
11
S
2
Posts: 127
Reputation: 1,532

Post » Thu Mar 15, 2012 1:09 pm

[QUOTE=Pixiefingers] I only want the last box to be able to tumble[/QUOTE]

well, then pin the others togehter
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Thu Mar 15, 2012 1:25 pm

I tried with applying some physics. so if its within given angle values, it pin them together, if not, I just add a little force to the box, so it "bounces" off.

With some changes, you could unpin all objects and add force to them, so the whole tower would crumble.

http://dl.dropbox.com/u/52716812/PinToExample_2.capx
B
38
S
13
G
9
Posts: 151
Reputation: 8,427

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Braus, Ethan, supreme676 and 7 guests