[SOLVED]Trying to set condition/destroy

For questions about using Classic.

Post » Tue Jul 05, 2011 8:29 am

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. The_Funny_Guy2011-07-05 13:07:01
B
16
S
5
G
4
Posts: 211
Reputation: 3,767

Post » Tue Jul 05, 2011 9:01 am

[QUOTE=The_Funny_Guy]
So as theres not such a condition as "if object DOESNT overlaps object", [/QUOTE]
Actualy, you can just invert "is overlaping" (with RMB). It's the same as "does not overlaps"
B
2
S
2
G
2
Posts: 158
Reputation: 1,366

Post » Tue Jul 05, 2011 9:46 am



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

you are my hero!
B
16
S
5
G
4
Posts: 211
Reputation: 3,767


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests