[SOLVED]Trying to set condition/destroy

This forum is currently in read-only mode.
From the Asset Store
A whole set you need to create a gorgeous winter 2d game
  • I have a layout that is 1000/1000. after 2nd secund random number of random sized sprites are randomly created.

    They are set to destroy if they touch another instance of themself.

    At the same time the creation event is set to be true as long as theres not a fixed number of sprites on the screen.

    Creation adds +1, destruction takes -1.

    And this works just fine.

    Then i have set, that after this process is finished.

    Another generator starts. it is being set +/- the same way the one above with few addons.

    First of all i want that 2nd sprite to be destroyed if he's NOT overlaping the 1st sprite. Said in other words: i want that 2nd sprite to get destroyed if its anywhere outside of sprite one, so setting sprite 1 as boundries.

    So as theres not such a condition as "if object DOESNT overlaps object", ive used:

    If object Sprite 2 is overlaping Sprite 1: nothing

    Else: sprite 2 destroy

    but this doesnt work.

    Of course i could solve this by not "creating" the sprite 2 but rather by making Sprite 1 "spawn" them. The problem is the shape of the spawn.

    I can set the image point of the Sprite 1 at its 0,0 x/y and then make the spawning coordinats imagepoint+random(number) to draw the area but the shape will be preety much random when i want it to follow my guidelines.

    Any idea how to do that? keep in mind that theres more then one of Sprite 1.

    Bottom line is: i want Sprite 2 to be spawned in a Sprite 1 pattern.

  • So as theres not such a condition as "if object DOESNT overlaps object",

    Actualy, you can just invert "is overlaping" (with RMB). It's the same as "does not overlaps"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • <img src="http://3.bp.blogspot.com/-OKQih2CCqQM/Tb80z6qeICI/AAAAAAAABIs/e1o2fUxA0XQ/s320/jaw-drop.jpg" border="0" />

    I cant remember when i felt more stupid then i feel now.

    you are my hero!

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