Collisions not working after Sprite has fallen?

0 favourites
  • 8 posts
From the Asset Store
Minimal Sprite Font with Stroke for Pixel Art games.
  • 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!

  • you should provide a capx, would be easier to see what's wrong ;)

  • 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.

  • 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")

  • Yes, you can use Dropbox to upload a file for example

  • 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!

  • 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?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • TheFlashYoda

    You could save a lot of time by just posting a .capx and letting people see the problem. Just follow THIS tutorial.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)