How do I reset Player Box Polygons

Get help using Construct 2

Post » Fri Sep 01, 2017 6:20 pm

So my 2D side stroller employs the 8 directional action as part of a flight power up. However, once my player lands & 8 directions are disabled I noticed the player walking on "invisible" bricks. On a hunch that the player box may somehow be responsible, I changed its opacity to 100% & played again. Sure enough, I saw that the 8 direction action had the player box spinning around the hotspot at the players feet. I remedied this under the original action that sets the player sprite to the player box every tick by adding "set angle to 0 degrees", thus stabilizing the player box. That part was easy :)

The problem subsided only somewhat. Sticking with my idea that it's a player box problem, I changed the shape, size & position of the player box's collision polygon within its sprite & gave it a few more runs. Turns out I'm right. I found my player tripping & walking all over the wildly twirling and invisible collision polygon of the player box even though the player box itself remained at 0 degrees.

The logic I seek is simple. If the player is on the ground, they should be effected by normal gravity. Not walking on invisible boxes.

Is there a way to reset or stabilize the collision polygon upon disabling 8 directions or do need to embark on some huge work-around where countless player boxes are spawned & destroyed?
B
9
Posts: 8
Reputation: 341

Post » Fri Sep 01, 2017 8:01 pm

Have you followed Ashley's recommendations from his platform tutorial and used a single frame, invisible generic sprite for collisions and attach all animations/behaviours to that?
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
86
Posts: 5,420
Reputation: 59,526

Post » Fri Sep 01, 2017 9:10 pm

Yes I have. The tutorials call it the "player box". It's the player box's collision polygon, specifically that's giving me all the trouble.
B
9
Posts: 8
Reputation: 341

Post » Sat Sep 02, 2017 6:46 am

SOLVED!!!

Under the properties for the 8 Direction Behavior, is "set angle". This is the option that rotates the Player box & hence its collision polygon. I simply set it to "NO". With this 1 option set in the properties, I was also able to delete the actions that set the player box angle to 0 degrees every tick. My event sheet looks much cleaner! ;)
B
9
Posts: 8
Reputation: 341


Return to How do I....?

Who is online

Users browsing this forum: tinhofiel and 42 guests