Multiple position and overlapping.

  • Still sorry for my poor English.

    A new problem about this.

    https://imgur.com/FckBkhE

    what i want is all buttons(Sprite1-5,each have a unique random position) are overlapping by soldiers(large quantity) at the same time.

    Then buttons will destroyed.

    I tried if all buttons at the same position then soldiers overlap it, it is effective.

    But if each buttons have a unique position, it isnt effective.

    How should I do?thanks very much.

  • You can try something like this:

    Sprite1 overlapping Soldier
         System->Pick All Soldier
         Sprite2 overlapping Soldier
             System->Pick All Soldier
             Sprite3 overlapping Soldier
                  System->Pick All Soldier
                  Sprite4 overlapping Soldier
                       System->Pick All Soldier
                       Sprite5 overlapping Soldier   -> (Destroy all sprites)
    [/code:3t7plozd]
    
    But it's easier to add Sprites 1-5 to a family and do this:
    [code:3t7plozd]
    SpriteFamily overlapping Soldier
         System Compare two values: SpriteFamily.pickedCount=SpriteFamily.count  -> SpriteFamily destroy
    [/code:3t7plozd]
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • But it's easier to add Sprites 1-5 to a family and do this:

    > SpriteFamily overlapping Soldier
         System Compare two values: SpriteFamily.pickedCount=SpriteFamily.count  -> SpriteFamily destroy
    [/code:wclxk7kq]
    

    It works!

    Amazing!

    Thank you very much indeed.

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