Collisions not working after Sprite has fallen?

Discussion and feedback on Construct 2

Post » Thu Apr 18, 2013 5:32 pm

Hi,

I hope I didn't miss it, but I saw no forum specifically for the two tutorials (beginner's and platform) so I'm just putting this here.

I have successfully completed the beginner's tutorial and have even added more stuff to it. I then went to do the same with the platform tutorial.

I was able to successfully complete the platform tutorial however I then wanted to add some things. The one I'm having trouble with at the moment is that I made it so it adds a new enemy snail every x seconds and I do so above the layout so it appears to drop down onto a tile then starts moving to the right.

I have several tiers of tiles so that it slides to the end and drops down a level and then another, etc. On the second to last tier, I want it to turn around and go to the left when it reaches the end.

When it collides with the invisible blue box (EdgeMarker) it does turn around, but depending on my speed/acceleration/deceleration settings, it either keeps sliding to the right and drops off into oblivion or it stops.

So the collision is being detected, as it turns to the left. However, it refuses to start moving to the left.

I would also like to note that other "static" snails on the level seem to stop moving when the first of these dynamically added snails hits this EdgeMarker.

Any advice/help/input would be greatly appreciated!
B
3
Posts: 4
Reputation: 183

Post » Thu Apr 18, 2013 6:17 pm

you should provide a capx, would be easier to see what's wrong ;)
B
12
S
3
G
4
Posts: 62
Reputation: 3,408

Post » Thu Apr 18, 2013 7:05 pm

I don't see a button to include file. Does that mean I would have to post my file somewhere else on the web and then provide a link here? Not sure where I could put it.
B
3
Posts: 4
Reputation: 183

Post » Thu Apr 18, 2013 7:06 pm

Also, make sure your MARKER and your "newly created" SNAIL is on the same layer (the one with PARALLAX set to 100,100) not in Background / UI layer.

You can specify the layer when you create the new object (using layer index or "layer name")



B
34
S
13
G
8
Posts: 134
Reputation: 8,118

Post » Thu Apr 18, 2013 7:27 pm

Yes, you can use Dropbox to upload a file for example
B
12
S
3
G
4
Posts: 62
Reputation: 3,408

Post » Thu Apr 18, 2013 8:59 pm

Random guess- I think the EdgeMarker object may be too small width-wise? If you, for example, had the EdgeMarkers' X size as 4 pixels, then if an object moves fast enough towards it, it will go through the object and not register a collision.

Another random guess- The deceleration is too low, that would mean the enemy slides off before it gets a chance to decelerate. In this case, On collision with the enemy and the EdgeMarker, set the enemys "Vector X Speed" to 0.

Hope this helps!
B
45
S
19
G
10
Posts: 562
Reputation: 9,543

Post » Thu Apr 18, 2013 10:02 pm

Potato: Yes to both.

Jase00: The EdgeMarkers are all 40x40 just as the tutorial suggests; I tried adding the Vextor X speed to 0 on collision and there was no effect.

The thing I don't get is, I have other snails that are not dynamically created and added; they are there from the beginning, placed by me statically in the layout. These are the same snail objects; the EdgeMarkers are the same objects;

The static snails hit the markers, turn around and do as desired. The dynamic ones do not - they either plow through the marker and fall of the edge or they stop (and in both cases, they DO turn around indicating that the collision WAS detected). Could the fall be somehow adding to their speed and somehow cause it to be going too fast to complete all of the collision commands?
B
3
Posts: 4
Reputation: 183

Post » Thu Apr 18, 2013 10:30 pm

@TheFlashYoda

You could save a lot of time by just posting a .capx and letting people see the problem. Just follow THIS tutorial.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,841
Reputation: 48,283


Return to Construct 2 General

Who is online

Users browsing this forum: glerikud and 9 guests