[Platformer] Possible Collision bug

Get help using Construct 2

Post » Fri May 24, 2013 7:08 am

Link to .capx file (required!):
https://dl.dropboxusercontent.com/u/88974109/Skyrunner.capx

Steps to reproduce:
1. Simply watch the game play out.
2.
3.

Observed result:
The enemyBox does not honor the collision with the enemyHolder

Expected result:
The enemyBox should change directions when colliding with the enemyHolder.

Browsers affected:
Chrome: yes
Firefox: yes
Internet Explorer: yes

Operating system & service pack:
Windows 7 no SP

Construct 2 version:
v132 Free Edition
B
4
Posts: 24
Reputation: 325

Post » Fri May 24, 2013 7:52 am

This is a bug in your events.

On the Enemies event sheet, events 4 and 5 are checking for a direction, changing it, and the very next event changes it back.

You should make this an Else, i.e.

enemysprite direction = "right" : enemysprite set direction to "left"

Else
enemysprite direction = "left" : enemysprite set direction to "right"


This should really have been posted in the 'How Do I' section.zenox982013-05-24 07:53:08
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,849
Reputation: 48,299

Post » Fri May 24, 2013 8:03 am

Thanks Zenox, that did fix it. I'm still not quite sure why though. I'm assuming that it's doing both actions, but the second option isn't true in that specific instance.

Either way, the else function worked just fine.
B
4
Posts: 24
Reputation: 325

Post » Fri May 24, 2013 8:13 am

Alright, I just realized why I didn't use the else function. It's because I have multiple instances of the enemy and I can't get them to act independently. I'm going to ask that this topic be moved to the "How do I..." section by any moderator that can do me the favor.
B
4
Posts: 24
Reputation: 325


Return to How do I....?

Who is online

Users browsing this forum: DemantDigitalArt and 20 guests