A problem with new instances V1.03.2

0 favourites
  • 5 posts
From the Asset Store
Create your game with this complete pack of images and animations!
  • Hi Ashley,

    New instances are behaving strangely, sprite collides with sprite5 and if you wait till the middle counter reaches the number 12 you can see it also disables the collision of new instances when it shouldn't since the collide variable is false for new instances.

    I also used to be able to just disable behaviors by using the "start of layout event" however as you can see it no longer works. It works for already existing instances but not new ones, as if you disable the "start of layout event" you can see the bullet behavior working.

    I think these 2 problems are related.

    Here is the capx.

    dl.dropbox.com/u/57137706/col3.capx

    Kind Regards

  • This project appears to be working correctly. I'm not sure what you're expecting to happen instead? It is useful to provide .capxs which are as minimal as possible, so any events or objects not directly related to the problem are removed.

    By the way, if you spawn objects inside (overlapping) other objects, you should not expect the result to be realistic either, since this is an impossible physical phenomenon.

  • Hi Ashley,

    Basically I'm trying to make something similar to a jumpthru without using the platformer behavior, when the collide variable is false collision should be on between sprite and sprite5. New instances automatically have the collide variable as false. Which should mean that the collision between sprite and sprite5 is on.

    Here 2 capx hopefully this explains it better. I've left the text objects so you can see the variables between the objects.

    The only difference between the 2 capx is that I moved the sprite object above sprite 4 to another position in collide2.capx.

    dl.dropbox.com/u/57137706/collide1.capx

    dl.dropbox.com/u/57137706/collide2.capx

    In collide1. The new instances should not be going through sprite5 since the variable is set to false.

    Basically when the variable on one instance is set to true it is disabling the collision for all new instances. All existing instances work correctly though.

    Ashely

    Here this might explain it best.

    dl.dropbox.com/u/57137706/collide3.capx

    press z - (collision works correctly)

    now click on one of the instances of sprite on the bottom so it jumps up. (Still working correctly)

    now press x - new instance goes through sprite5 when it shouldn't.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm afraid I don't think this can be fixed - it's a limitation of the physics engine that only entire object types can disable collisions between each other, not individual instances. So 'disable collisions' will affect all instances at once.

  • Ashely

    But Ashley it's not disabling them all, its only disabling the new created instances any existing instances still works correctly. If you look at the instance above sprite5 then you can see it still functions with collision after its been disabled. But since it can't be fixed is there any workaround for a custom jumpthru per instance.

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