How do I change animation on edge of platform?

Get help using Construct 2

Post » Wed Apr 01, 2015 4:09 pm

Hi,
I'm working on a platform game and I would like to make the player to change the animation when he's on the edge of a platform, like he's making balance not to fall.
Is this possible to do?

Thanks! :)
B
5
S
1
Posts: 42
Reputation: 471

Post » Wed Apr 01, 2015 4:47 pm

Easiest way would probably be having an invisible sprite at the edge and detecting overlap.

is ovelapping edge-detect - play balancing.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Apr 02, 2015 4:07 pm

I thought there would be another way so I don't have to add sprites.

Thanks!
B
5
S
1
Posts: 42
Reputation: 471

Post » Thu Apr 02, 2015 5:43 pm

no sprites..just one sprite..pin sprite to player image point(1?) ,, is is ovelapping edge-detect - play balancing.

,,,,,,
if you using sprites for platform (not tiledbackgraund)..
you can use ...Pick ovelapping point...
Image
B
62
S
23
G
7
Posts: 1,470
Reputation: 10,731

Post » Thu Apr 02, 2015 9:16 pm

I see, I'm using sprites yes.
But I don't see any options in the events to do that like you said.
Could you please send me an example? or write here the expresions.

Thanks!
B
5
S
1
Posts: 42
Reputation: 471

Post » Fri Apr 03, 2015 6:26 am

Hi @gleegum

This is the basic idea....

Image

Now you can check if player overlapping this points..or you can comape distance between player
and Platform image points...


capx:
http://s000.tinyupload.com/index.php?fi ... 8547969723
Image
B
62
S
23
G
7
Posts: 1,470
Reputation: 10,731

Post » Mon Apr 06, 2015 5:14 pm

Thanks so much for the capx! Very useful!
B
5
S
1
Posts: 42
Reputation: 471


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 4 guests