Сollision object

0 favourites
  • 7 posts
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • I have 3 sprite, which overlap each other, we can say they are the same width and X is the same. There are bullet sprite. I made a condition that the collision ("on collision") With any of these sprites (one event through "or") Bullet destroyed and taken away from the Live variable 35.

    So, if the bullet hits the point of overlap of the 3 sprites, then the variable will be taken away three times the number is 105.

    Can somehow fix it?

    Tried and family to do all the sprites and check for collision with the family, does not help. Just trying to make a variable that is set to 0 when the bullet collides with sprites and after some time it becomes equal to 1, and that only when variable = 1, only consuming 35 did not help. Tried to make and through Overlapping and Trigger Once, all also did not work.

    Can I somehow fix it and make that would take up only 35 in each collision, and no matter how many bullet grazed sprites?

  • try "pick top instance" as a condition with the collision.

    What's the point of the game?

    You can fix it also by disabling collisions for all overlapping sprites for like 0.2 seconds when a bullet collides with one of them.

    You can also put the condition inside a groupe and disable the group for 0.2 seconds on collision.

    Also i advise puttin those overlapping sprites in a family instead of using OR statements and try with trigger once.

    The best wat is to post your commented capx tho

  • Uniform you can't combine On collision with Trigger once because On collision already triggers only once per collision.

  • Uniform you can't combine On collision with Trigger once because On collision already triggers only once per collision.

    right codah. Is overlapping+trigger once or just on collision

  • C2 will let you do Is Overlapping + trigger once but then that's like On Collision

    edit: I take it back, looks like overlapping + trigger once is your answer alexheg

    try this

    [attachment=0:vrngsale][/attachment:vrngsale]

  • codah

    Thank you, it helped.

    It is a pity that another problem still remained. The problem is that I have 2 copies of the enemy with the private variable "Lives". And if I do so as in the screenshot, then life is taken away from both in contact with only one, with generally unknown as it is taken away, the double-triple number...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need to do further picking to isolate a single Enemy. Something like Enemy(0) or picking top instance, or similar.

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