multiple collision polygons for one frame?

Get help using Construct 2

Post » Wed Jan 08, 2014 1:22 pm

I'm trying to have it so that different animations and events play out depending on whether my character has objects/projectiles colliding with the front or the back of the sprite. In the case that there is a way to have multiple collision polygons on one frame, i'd be really grateful if someone told me how to do it.

If not, then i'd really appreciate someone telling if there's another way from me to get the whole different-animations-and-events-depending-on-whether-the-front-or-back-is-hit-thing

I have some ideas as to how I could go about it if multiple collision polygons are impossible, but they're kind of convoluted and cumbersome, so any help would be appreciated :D
B
6
Posts: 25
Reputation: 300

Post » Wed Jan 08, 2014 3:37 pm

not sure if this will work depending on your context but you could check the projectile X against the character X, in a sub event under the collision

projectile | on collision with character
>projectile.x greater than character.x --> play hit from right animation
>projectile.x less than character.x --> play hit from left animationkeepee2014-01-08 15:38:49
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Wed Jan 08, 2014 5:08 pm

Another solution would be to have invisible sprites act as collision-boxes. just pin them to the playerobject (probably putting them in a container would be usefull too)
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 » Wed Jan 08, 2014 9:17 pm

Oohhh, both good ideas, Ill keep them in mind, Thank you!
B
6
Posts: 25
Reputation: 300


Return to How do I....?

Who is online

Users browsing this forum: tarek2 and 2 guests