Bound to Object

Get help using Construct 2

Post » Thu Oct 18, 2012 2:50 pm

Hi there, I was wondering if anyone knows how to make something similar to the bound to layout behaviour, except binding something to an object. Basically, if you are not overlapping the object, it will immediately move you back towards the object (not the centre of the object though) and prevent you from stepping out. Another way to think of it is that the whole background is solid and that the object the player is bound to is jump-thru.Len2012-10-18 14:50:30
B
7
S
1
G
1
Posts: 37
Reputation: 1,128

Post » Thu Oct 18, 2012 3:05 pm

Well there's always clamp, as in every tick set x to clamp(sprite.x- sprite.width/2, sprite.x+sprite.width/2)
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Mon Oct 22, 2012 10:39 am

Thanks newt, that was useful :)
B
7
S
1
G
1
Posts: 37
Reputation: 1,128


Return to How do I....?

Who is online

Users browsing this forum: suicidenutella, Vallar and 0 guests

cron