Platformer - Enemies off screen behaviour

Get help using Construct 2

Post » Thu Jan 31, 2013 2:33 pm

Hello

I am currently learning the engine and making a test Platformer. In this game, the play area is bigger than the screen and there are platforms with enemies outside the player's screen. I have set up edge markers to stop the enemies from walking off a platform according to the tutorials.

The problem I have is that enemies that are off screen seem to randomly disregard the edge marker, making them walk off the platforms. Can anyone help me?

CAPX: https://www.dropbox.com/s/1mrtrcexzdatvsb/Painter%20Platformer.capx

Thank you in advance!!
B
5
Posts: 20
Reputation: 370

Post » Thu Jan 31, 2013 3:09 pm

I think it's the jump-through behaviour that's causing the problem, your edge markers seem to work fine if you swap out the jump-through with a solid. Not sure why the behaviour isn't working though, sorry.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Thu Jan 31, 2013 3:21 pm

Yes it true, if the tiles are solid then the enemies function fine, although this is not the behavior I need for this game. Thanks for giving it a shot Nimtrix.
B
5
Posts: 20
Reputation: 370

Post » Thu Jan 31, 2013 3:29 pm

I had another look and found a possible solution. If you open your enemy object's animations and set the collision polygon to bounding box it should work. (right click in collision window)
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Thu Jan 31, 2013 3:54 pm

Thanks Nimtrix, this worked. So far the game is stable. Again thank you for the help. If I find any solution to a custom collision polygon problem, I will post it here.

Again, thanks for your quick assistance.
B
5
Posts: 20
Reputation: 370

Post » Thu Jan 31, 2013 4:31 pm

You should use an invisible rectangle sprite for the player and enemy movement with the animations as a separate sprite pinned on top to avoid things like this.

See the "Implementing reliable platform movements" part of the platform manual page:
https://www.scirra.com/manual/100/platform
and
http://www.scirra.com/tutorials/253/how-to-make-a-platform-game/page-4
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Thu Jan 31, 2013 4:35 pm

Thank you ramones. I will try this as well.
B
5
Posts: 20
Reputation: 370


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 28 guests